Chapter 136·Intermediate
The Event Loop: How Pages Stay Responsive
01 / 06
The core idea
JavaScript runs on a single main thread. The event loop is the mechanism that decides what that thread does next — running code, handling events, and rendering.