Promise finally
Raul-Sebastian Mihăilă
raul.mihaila at gmail.com
Fri Feb 23 10:20:59 UTC 2018
I find it weird that
```js
Promise.resolve().finally(() => {}).then(() => { console.log(1); });
Promise.resolve().then(() => {}).then(() => { console.log(2); });
```
prints 2 and then 1. It would have been possible to spec it in such a way
that it would have printed 1 and 2.
On the other hand
```js
Promise.resolve().finally().then(() => { console.log(1); });
Promise.resolve().then().then(() => { console.log(2); });
```
prints 1 and then 2.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20180223/3b361666/attachment.html>
More information about the es-discuss
mailing list