Sobes.tech
Back to tasks
Junior — Middle+
57

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

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

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

Promise.resolve(1)
    .then(x => console.log(1))
    .catch(x => console.log(2))
    .then(x => console.log(3))

Promise.reject(2)
    .then(x => console.log(4))
    .then(x => console.log(5))
    .catch(x => console.log(6))
    .then(x => console.log(7))