Question 4
Consider the following JavaScript code snippet.
Promise.resolve(1) .then(x => x + 1) .then(x => Promise.resolve(x + 1)) .then(x => { throw 'error' }) .catch(e => e + 4) .then(x => console.log(x))What will be the output on the console?
7
error
undefined
error4