A complaint nobody answered
A promise rejects with no .catch(), but there is an 'unhandledRejection' handler.
process.on('unhandledRejection', (reason) => { console.log('caught: ' + reason.message);});process.on('exit', (code) => console.log('exit ' + code));Promise.reject(new Error('no table'));console.log('main done');1. Predict the output
Tap the lines in the order you think they print.
- 1…
- 2…
- 3…