Sobes.tech
Back to tasks
Junior — Senior
24

Порядок вывода в консоль (пример 57)

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))
    .catch(x => console.log(6))
    .then(x => console.log(7))