# Event Loop

*noun*

say it: **“ih-VENT LOOP”** **/ɪˈvɛnt lup/**

The part of JavaScript's runtime that waits until the call stack is empty, then moves the next waiting callback onto it to run.

## What is **Event Loop** in JavaScript?

**Event Loop** — The runtime mechanism that schedules queued work when the call stack is available.

## In a sentence

- “Thanks to the **event loop**, the timer's callback ran only after the rest of my code had finished, even with a delay of 0.”
- “The **event loop** is like a host at a busy restaurant, seating the next party only when a table is free.”
- “My timer set to 0 milliseconds still ran last, because the **event loop** waits for the current code to finish first.”

Level: Master · [More JavaScript terms at this level](https://www.ask-codey.com/glossary?category=javascript&level=5)

Updated: November 9, 2026

## In other subjects

- [Event Loop in Node.js](https://www.ask-codey.com/glossary/event-loop-nodejs)
- [Event Loop in Python](https://www.ask-codey.com/glossary/event-loop)

Source: https://www.ask-codey.com/glossary/event-loop-javascript
