typestar

Promises & async

19 steps in 6 sets of JavaScript.

JavaScript is single-threaded and pretends otherwise convincingly. Promises first, properly, because async/await is sugar over them and the sugar leaks.

Then async iteration, scheduling with the microtask queue, and finally canceling and rate-limiting with AbortController. Nineteen steps, and it is the tour that explains why your console.log printed in that order.

Start this tour

Promises

async and await

Iterating asynchronously

Scheduling

Canceling & limiting

Encore

  • fetch-repos.jsFetch a user's repos concurrently and rank them by stars.

The other JavaScript tours