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

13 lines
236 B
Markdown

# 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?
```js
promise.then(f1).catch(f2);
```
Versus:
```js
promise.then(f1, f2);
```