unref(): a booking that doesn't count
A long timer that is unref()'d and a short normal timer.
const late = setTimeout(() => console.log('late order'), 1000);late.unref();setTimeout(() => console.log('short order'), 10);process.on('exit', () => console.log('exit'));console.log('main done');1. Predict the output
Tap the lines in the order you think they print.
- 1…
- 2…
- 3…