Junior — Senior
What will be output to the console (example 87)
livecode
Task condition
Determine which output will appear in the console when executing the following code:
Promise.resolve(1)
.then(x => x + 1)
.then(x => { throw x })
.then(x => console.log(x))
.catch(err => console.log(err))
.then(x => Promise.resolve(x))
.catch(err => console.log(err))
.then(x => console.log(x))