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

In an async function, what does `await null` do to the code after it, and how does that interact with a process.nextTick scheduled before the function is called?

async function main() { console.log('A'); await null; console.log('B'); } process.nextTick(() => console.log('nextTick')); main(); Promise.resolve().then(() => console.log('promise')); console.log('end');