Call Stack
— LIFO · runs one frame at a time (single-threaded)
Web APIs
— browser handles timers, fetch, DOM events off-thread
Event Loop
Idle — waiting for the call stack to empty.
process.nextTick queue
— Node only · drained BEFORE Promises and before every phase
Microtask Queue
— Promises, await, queueMicrotask · drained FULLY first
Task Queue (Macrotasks)
— setTimeout, events, fetch callbacks · ONE per loop tick