Created
October 26, 2024 15:56
-
-
Save Mefistophell/34c33dccf7249c8625224ead10f4a56d to your computer and use it in GitHub Desktop.
What will the log look like?
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
const promise = new Promise((resolve, reject) => { | |
console.log(1); | |
setTimeout(() => { | |
console.log("timerStart"); | |
resolve("success"); | |
console.log("timerEnd"); | |
}, 0); | |
console.log(2); | |
}); | |
promise.then((res) => { | |
console.log(7); | |
console.log(res); | |
}); | |
console.log(4); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment