Do settled promise chain handlers fire in the same turn?
/#!/JoePea
joe at trusktr.io
Sat Feb 25 19:22:06 UTC 2017
I'm not sure what's the best way to phrase the subject (please advise on
the terminology), but for example, if we have a promise chain
```js
const p = new Promise(r => setTimeout(r, 100))
p
.then(() => Promise.resolve(console.log('A')))
.then(() => Promise.resolve(console.log('B')))
.then(() => Promise.resolve(console.log('C')))
```
, will the `console.log`s fire in the same turn when promise `p` settles,
or will they fire in three separate turns?
*/#!/*JoePea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170225/baabd67c/attachment.html>
More information about the es-discuss
mailing list