Explore Library
Quiz

Await vs Promise Microtask Ordering

Predict the exact log order when Promises, async/await, and setTimeout interleave through the event loop.

What is the exact console output order? console.log('A'); setTimeout(() => console.log('B'), 0); Promise.resolve().then(() => console.log('C')); (async () => { console.log('D'); await null; console.log('E'); })(); console.log('F');