Back to tasksGet help with live coding in real time with Sobes Copilot
Junior — Senior
23
Определение последовательности вывода в консоль №64
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);
const foo1 = {} => {
console.log('foo1');
return Promise.resolve().then(foo1);
}
foo1();