Junior — Senior
Determine the order of outputting numbers to the console
livecode
Task condition
Determine the order in which the numbers will be printed when executing this code.
// console.log(1);
// setTimeout(() => console.log(2));
// Promise.resolve().then(() => console.log(3));
// Promise.resolve().then(() => setTimeout(() => console.log(4)));
// Promise.resolve().then(() => console.log(5));
// setTimeout(() => console.log(6));
// console.log(7);