Skip to content
WebDev Path
Back

Week 8: Async JavaScript and APIs

Next video

Free lesson by Fireship on YouTube

About this lesson

Module:
JavaScript
Time:
about 12 hours
Video:
12 min

Load real data from the internet and handle slow or failed requests.

By the end of this week you can

  • Explain promises and async/await
  • Call a REST API with fetch
  • Show loading, empty and error states

Learn

  • The event loop in plain words
  • Promises and async/await
  • fetch, JSON and HTTP errors
  • try/catch and user-friendly errors

Read or watch

Practice

  1. Call 3 free public APIs
  2. Handle a failed request without breaking the page

Build

Weather or movie search app with loading and error states.

Check your understanding

Score 4 out of 5 to complete this week.

  1. 1. What does fetch() return?
  2. 2. Does fetch reject the Promise on a 404 response?
  3. 3. What does await do inside an async function?
  4. 4. How should you handle errors with async/await?
  5. 5. Which runs two independent requests at the same time?
0 of 5 answered