Visualize how the call stack, microtask queue, macrotask queue, and Web APIs interact to execute asynchronous JavaScript
JavaScript is single-threaded - it can only execute one thing at a time on the call stack. The event loop enables asynchronous behavior.
Execution Order:
Key insight: Microtasks can schedule more microtasks, and they ALL run before the next macrotask. This is why Promise callbacks always execute before setTimeout(fn, 0) callbacks.