-
-
Save rom1504/6a9127764b43e38569e704f94ac99908 to your computer and use it in GitHub Desktop.
async function execution order
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function f() { | |
console.log('a') | |
await new Promise(resolve => setTimeout(resolve, 0)) | |
} | |
f().then(() => console.log('c')) | |
console.log('b') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
always outputs a b c