Skip to content
Tech Atlas, home
Search
Esc
  • All roadmapsBrowse every learning path
  • ExploreFind a technology area
  • ProjectsGuided projects and builds
  • My AtlasYour learning dashboard
Practice build · Frontend and the browser

Build your own Promise

A Promises/A+ compliant promise: states, then-chaining and error propagation, then Promise.all and friends on top.

  • Intro
  • About 3–6 h
  • 4 checkpoints
  • 2 tutorials · JavaScript

Pick a tutorial, then check yourself at each checkpoint. Work in any language you like.

Choose a tutorial

Why build it

Many async bugs in JavaScript come from misunderstanding promise resolution and the microtask queue. Implementing the specification clears them up.

You will be able to

  • Model the pending, fulfilled and rejected states and their transitions.
  • Chain then calls and propagate values and errors.
  • Explain microtasks versus macrotasks.
  • Implement Promise.all, Promise.race and Promise.allSettled.

Skills it exercises

Recommended on Frontend Engineer.

Checkpoints

How you know you are there

Work in any language. Each checkpoint ends with something you can run or observe, so you can check it yourself.

  1. Checkpoint 1Self-check

    States

    Done when: A promise settles once; later resolve or reject calls are ignored.

  2. Checkpoint 2Self-check

    Chaining

    Done when: Values and thrown errors propagate through chained then calls, and returning a promise from then waits for it.

  3. Checkpoint 3Self-check

    Specification

    Done when: Your implementation passes the official Promises/A+ test suite.

  4. Checkpoint 4Self-check

    Combinators

    Done when: Promise.all, race and allSettled behave like the built-ins in your tests, and await works with your promise.

Stretch goals

  • Cancellation with AbortSignal.
  • A retry helper with exponential backoff.
Follow a tutorial

Step-by-step guides

Pick one in a language you know (tutorial languages: JavaScript). They open on the author’s site.

Practice builds are self-paced: Tech Atlas does not track them or count them as evidence. To show a skill, take its knowledge check from the skill page.

Tutorials come from codecrafters-io/build-your-own-x (CC0, snapshot of 2026-07-14, commit aa17439; links checked on 2026-10-19). Each tutorial belongs to its author and keeps its own licence; Tech Atlas links to it and does not host it. Briefs, checkpoints and the mapping to skills are Tech Atlas editorial drafts.