Games Node.js Loop Quest The VIP line
A tick inside a promise
A promise callback queues a nextTick, and another promise is already waiting.
Promise.resolve().then(() => { console.log('p1'); process.nextTick(() => console.log('tick'));});Promise.resolve().then(() => console.log('p2'));1. Predict the output
Tap the lines in the order you think they print.
- 1…
- 2…
- 3…