Just like the try(), catch() and throw() in Java as an exception handling is like then() and catch() in JavaScript as a promise!? Just a beginner asking some questions. Please don’t judge. xD Answer try/catch detect the error itself and transfer control to catch part. this syntax exists in js too. but in then/catch, you must notify occurring an error
Tag: promise
What’s the difference between a Future and a Promise?
What’s the difference between Future and Promise? They both act like a placeholder for future results, but where is the main difference?