← Back to Playground
Event Loop Visualizer
Step through how JavaScript's event loop processes synchronous code, timers, and promises.
script.js
1console.log('start')
2
3setTimeout(() => {
4 console.log('timeout')
5}, 0)
6
7console.log('end')
Call Stack
(main script)
Web APIs
empty
Event Loop
Microtask Queue
empty
Macro Queue
empty
Console
no output yet
Step 1 of 11
Script starts executing — it is pushed onto the Call Stack as the main frame.
Call Stack
Web APIs
Microtask (Promises, await)
Macro Task (setTimeout, setInterval)