Do settled promise chain handlers fire in the same turn?
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
const p = new Promise(r => setTimeout(r, 100))
.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?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss