Step through JavaScript execution. Watch the call stack, Web APIs, microtask queue, and macrotask queue — and see why microtasks always drain before the next task.
Select an example and press Step to begin.
Loop turn: run one macrotask (or initial script) → drain all microtasks → optionally render → repeat.
Microtasks include Promise.then, queueMicrotask, and MutationObserver.
setTimeout callbacks land in the macrotask queue after the timer fires in Web APIs.