12 lines
235 B
Markdown
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);
|
|
```
|