0
I just started the Promises study and came across the second dilemma: What’s the difference between using Ry and catch to handle errors and then and catch? What’s the best case for each of them?
0
I just started the Promises study and came across the second dilemma: What’s the difference between using Ry and catch to handle errors and then and catch? What’s the best case for each of them?
Browser other questions tagged javascript asynchronous promises try-catch
You are not signed in. Login or sign up in order to post.
John, this question would help you? Try/catch on JS. As you are new on the site I invite you to do the tour, read the guide to How to ask and access to help center
– Luiz Augusto
try
/catch
sane constructions of language itself, are for any code that might throw an error. Promises is a specific API for asynchronous operations (see more details here) who possesses the methodsthen
andcatch
, which serve to chain operations– hkotsubo