12 lines
230 B
Markdown
12 lines
230 B
Markdown
# Promise then vs 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);
|
|
```
|