Sobes.tech
Junior — Senior

Result of Promise chain execution in the console

livecode

Task condition

What 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(1))
  .catch(err => console.log(err))
  .then(x => console.log(x));