en.javascript.info/1-js/11-async/03-promise-chaining/01-then-vs-catch/task.md
2019-03-05 18:44:28 +03:00

236 B

Promise: then versus catch

Are these code fragments equal? In other words, do they behave the same way in any circumstances, for any handler functions?

promise.then(f1).catch(f2);

Versus:

promise.then(f1, f2);