Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardJavaScriptmicrotask vs macrotask orderingSingle-choice MCQ

In Node.js, what is logged and why, given how the `process.nextTick` queue relates to the Promise microtask queue?

Promise.resolve().then(() => console.log('promise')); process.nextTick(() => console.log('nextTick')); console.log('sync');