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

Consider the ordering of output. Given the microtask/macrotask model, what is logged and in what order?

console.log('A'); setTimeout(() => console.log('B'), 0); Promise.resolve().then(() => console.log('C')); console.log('D');