console.log("1");
setTimeout(function () {
console.log("2");
new Promise(function (resolve) {
console.log("3");
resolve();
}).then(function () {
console.log("4");
});
setTimeout(function () {
console.log("5");
new Promise(function (resolve) {
console.log("6");
resolve();
}).then(function () {
console.log("7");
});
});
console.log("14");
});
new Promise(function (resolve) {
console.log("8");
resolve();
}).then(function () {
console.log("9");
});
setTimeout(function () {
console.log("10");
new Promise(function (resolve) {
console.log("11");
resolve();
}).then(function () {
console.log("12");
});
});
console.log("13");
Created
December 18, 2023 05:16
-
-
Save mitoop/a3bc8fa50633c458702463b5b15d65a7 to your computer and use it in GitHub Desktop.
Event Loop
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment