Created
March 13, 2023 12:31
-
-
Save Andarist/bc7fe894a4284e2a002d2511b3d46bb9 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 microtask() { | |
return Promise.resolve().then(() => {}); | |
} | |
async function test() { | |
queueMicrotask(() => { | |
console.log("1"); | |
queueMicrotask(() => { | |
console.log("2"); | |
}); | |
}); | |
await microtask(); | |
console.log("3"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment