al-amiir / Questions

0 stars 0 forks source link

JS Promise #4

Open mohamed-abdul-fattah opened 3 years ago

mohamed-abdul-fattah commented 3 years ago
  1. What are JS promises?
  2. What are the problems that promises solve in JS world?
  3. Do you have to implement catch with every then method to catch the rejected promise? Is the following snippet valid?
    returnsPromise()
    .then(doSomething)
    .then(doSomethingElse)
    .catch(hadnleAnyError)