Sobes.tech
Back to tasks
Junior — Senior
28

Порядок вывода в консоль (задача №63)

Get help with live coding in real time with Sobes Copilot
Task condition

Определите, в каком порядке будут напечатаны значения в консоль при выполнении следующего JavaScript‑кода:

console.log(1);
setTimeout(function() {
    console.log(2);
});

Promise.resolve(3).then(console.log);

console.log(4);
setTimeout(function() {
    console.log(5);
}, 0);
console.log(6);