en.javascript.info/6-async/03-promise-chaining/01-then-vs-catch/task.md
Ilya Kantor 455d300d8d renames
2017-05-25 11:56:32 +03:00

12 lines
235 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, f2);
```
Versus;
```js
promise.then(f1).catch(f2);
```