Learn JavaScript

Lesson 6 of 9 · Async 2: Promises, async/await and fetch

Module 13 · Async 2: Promises, async/await and fetch

The Contest and Interview Pack: Output Puzzles, Promise.all by Hand and a Bug Gallery

ProReading

Every JavaScript interview past the first round asks about async code. The questions come in three kinds. First, "what does this print?", where the answer comes from the queue rules of Lesson 05. Second, "implement this", where Promise.all is the favourite. Third, "what is wrong here?", where the code runs but does the wrong thing.

Checking what this lesson needs for you…

What is inside The Contest and Interview Pack: Output Puzzles, Promise.all by Hand and a Bug Gallery

  1. Six promise output puzzles
  2. Promise.all by hand
  3. for await, a preview of Module 16
  4. A microtask against a task
  5. Six interview questions