Games Node.js Loop Quest One chef, one stove
A throw unwinds the stack
inner() throws, two frames below a try/catch. What runs on the way out?
function inner() { throw new Error('oops');}function outer() { inner(); console.log('never');}try { outer();} catch (e) { console.log('caught ' + e.message);}console.log('after');1. Predict the output
Tap the lines in the order you think they print.
- 1…
- 2…