Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardNodeJSmicrotasks vs timer phaseSingle-choice MCQ

Two setImmediate callbacks are registered, and the first one schedules a third setImmediate plus a process.nextTick. Given how the check phase and inter-phase checkpoints work, what is the print order?

setImmediate(() => { console.log('a'); setImmediate(() => console.log('c')); process.nextTick(() => console.log('nt')); }); setImmediate(() => console.log('b'));