Junior — Middle+
Order of output to the console (task 56)
livecode
Task condition
Determine the order in which the lines will be printed when executing the following code:
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))