Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardNodeJSprocess.nextTick queue orderSingle-choice MCQ

Predict the exact output order. The key subtlety is how process.nextTick interleaves with promise microtasks within a single drain.

process.nextTick(() => { console.log('nextTick1'); Promise.resolve().then(() => console.log('promise2')); }); Promise.resolve().then(() => { console.log('promise1'); process.nextTick(() => console.log('nextTick2')); });