06
Promises & async

Promises & async

The promise model and the event loop, demystified — written for people who just want their code to work.

~ 100 min·7 lessons·updated jan 2026

What you'll learn


Lessons

Read in order. Each lesson stands on its own, but the order is deliberate.

  1. 01
    Why callbacks weren't enough
    The pyramid, error handling, and inversion of control.
    11 min
  2. 02
    What a promise is
    A value with a state. Pending, fulfilled, rejected.
    13 min
  3. 03
    then, catch, finally
    Chaining and the rules promises actually follow.
    14 min
  4. 04
    async / await
    The same promises, written like procedures.
    15 min
  5. 05
    Parallel vs sequential
    Promise.all, allSettled, race — and when each is wrong.
    14 min
  6. 06
    Errors in async code
    try/catch, unhandled rejections, and the patterns that survive.
    14 min
  7. 07
    Microtasks and the event loop
    Why the order of your logs sometimes lies.
    16 min

Prerequisites

  • · Comfortable with JavaScript functions
  • · Have written a callback or two

After this, try