We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
new Promise((resolve, reject) => { resolve(); }) .then(() => { console.log('outer tick0'); new Promise((resolve, reject) => { resolve(); }) .then(() => { console.log('inner tick0'); return Promise.resolve(); }) .then(() => { console.log('inner tick1'); }) }) .then(() => { console.log('outer tick1'); }) .then(() => { console.log('outer tick2'); }) .then(() => { console.log('outer tick3'); }) .then(() => { console.log('outer tick4'); }) // native promise output // outer tick0 // inner tick0 // outer tick1 // outer tick2 // outer tick3 // inner tick1 // outer tick4 // then/Promise output // outer tick0 // inner tick0 // outer tick1 // inner tick1 // outer tick2 // outer tick3 // outer tick4
What's the reason behind this?
The text was updated successfully, but these errors were encountered:
I'm fairly sure the order in which the callbacks are invoked is undefined, and is thus an implementation detail you should not rely on.
Sorry, something went wrong.
Is the order in which the callbacks are invoked defined in the ECMAScript Specification or any other place?
order in which the callbacks are invoked
No branches or pull requests
What's the reason behind this?
The text was updated successfully, but these errors were encountered: