Junior — Senior
What will be displayed in the console when executing this JavaScript code
livecode
Task condition
You need to predict which values will appear in the console after running the following code snippet.
setTimeout(() => console.log(1));
Promise.reject(2).catch(console.log);
Promise.resolve().then(() => setTimeout(() => console.log(3)));
new Promise((resolve) => setTimeout(resolve)).then(() => console.log(4));
Promise.resolve(5).then(console.log);
setTimeout(() => console.log(6));
console.log(7);