The Eventloop in JavaScript - How does it work?
summary
Explains that the event loop actually orchestrates when callbacks run, showing microtask queue vs macro task queue, how Promises, setTimeout and fetch are scheduled, and why a busy loop freezes the UI. Demonstrates a small demo page (fast/slow buttons) and a VS Code Typescript Worksheet plugin running Node/Chrome runtimes; both work and reveal ordering surprises (zero ms setTimeout still defers; first 40 quiz entrants, 28 got one question right). Live-coding verifies behaviors.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 1:49Engine vs runtime
- 5:19Why event loop needed
- 7:50Call stack and queues
- 12:26Web APIs and event loop
- 16:41Event loop mechanics
- 17:04Live coding demo
- 27:09Interactive quiz
- 40:14Q&A and closing








