Expanded Library

Refactoring JavaScript Promises with Async/Await

What you'll learn

In this project, you'll learn how to refactor traditional JavaScript promises into ones using Async/Await. You'll also learn how to use Promise.all() and Promise.race() successfully.

Table of contents

Setup
1h
  • Set up your local environment for this project. We'll walk you through everything you need to know, including how to install and configure your environment to be able to complete all of the tasks.
Simulate a Fetch Call with setTimeout()
10m
  • Learn how to use setTimeout() to simulate an asynchronous call.
Fetching Movies with a Traditional Promise
30m
  • In this module, we will fill in the fetchMovies function in index.js.
Run Multiple Promises with Promise.all() and Promise.race()
45m
  • Learn how to run promises in parallel with Promise.all() and Promise.race().
Make Async/Await Version of fetchMovies()
15m
  • Have fetchMovies() use async/await syntax instead of traditional promises.
Make Async/Await Version of fetchBooks()
10m
  • Have fetchBooks() use async/await syntax instead of traditional promises.
Create Async versions for Promise.all() and Promise.race()
45m
  • Turn our functions utilizing Promise.all() and Promise.race() into async functions.
Enable Error Handling
15m
  • In this module, you'll learn how to handle errors in promises.
Creating and Clearing Timers
10m
  • Learn to create and clear timeouts created with setTimeout().
Ready to upskill? Get started