Games Node.js Loop Quest The VIP line
Between two timers
A timer queues a promise and a nextTick. Another timer is due too.
setTimeout(() => { console.log('timer 1'); Promise.resolve().then(() => console.log('promise')); process.nextTick(() => console.log('tick'));}, 0);setTimeout(() => console.log('timer 2'), 0);1. Predict the output
Tap the lines in the order you think they print.
- 1…
- 2…
- 3…
- 4…