Event Loop

Web APIs

Browser-provided features (timers, fetch, DOM events) that run outside the JS engine. You hand them work and a callback; they run it on their own and hand the callback back when done — so the stack stays free.

setTimeout hands the timer to the browser; your callback comes back later.

Call stack
setTimeout()
Web APIs
Task queue
Async work runs off the stack

One of 40 cards in the JavaScript deck. Browse every card.