Learn JavaScript

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

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

Every Promise Method, One by One, With What It Returns

Free with an accountReading

Kenji builds the home page of a food delivery app. The page needs three things from the server: the user's name, the open restaurants and the running offers. Each request is a promise. Kenji's first version waits for them one after another, and the page feels slow.

Checking what this lesson needs for you…

What is inside Every Promise Method, One by One, With What It Returns

  1. new Promise and the executor
  2. then and what it returns
  3. catch
  4. finally
  5. Promise.resolve and Promise.reject
  6. Promise.all
  7. Promise.allSettled
  8. Promise.race
  9. Promise.any
  10. Promise.withResolvers (ES2024)
  11. async functions always return a promise
  12. await
  13. try and catch around await
  14. Sequential against parallel
  15. Which combinator