Marius Schulz
Marius Schulz
Front End Engineer

Asynchronous JavaScript with async/await

I'm super excited to present Asynchronous JavaScript with async/await, my first egghead.io course!

Asynchronous JavaScript with async/await

It consists of 8 concise videos with a total length of 18 minutes. Grab a beverage of your choice, lean back, and learn all about ES2017's asynchronous functions:

  1. Write an Asynchronous Function with async/await: This lesson introduces the ES2017 async and await keywords. It shows how to write a short asynchronous function that makes an HTTP request and parses the response.
  2. Call an Asynchronous Function in a Promise Chain: In this lesson, we’re exploring how asynchronous functions can be seamlessly called within a promise chain — just like any other function that returns a promise.
  3. Convert Any Function into an Asynchronous Function: Any function can be made asynchronous, including function expressions, arrow functions, and methods. This lesson shows the syntax for each of the function types.
  4. Handle Errors in Asynchronous Functions: This lesson shows how regular control flow statements such as try/catch blocks can be used to properly handle errors in asynchronous functions. Oftentimes, the resulting code is easier to read than complex promise chains with .catch() methods.
  5. Await Multiple Promises Sequentially or Concurrently: You can await multiple promises either sequentially or concurrently, depending on where you put the await operators. This lesson shows both approaches and compares the performance characteristics.
  6. Await Multiple Promises Concurrently with Promise.all(): Oftentimes, you want to kick off multiple promises in parallel rather than awaiting them in sequence. This lesson explains how that can be achieved in a readable manner using await, the Promise.all() method, and destructuring assignment.
  7. Use the await Operator with Any Thenable: The await operator is not restricted to ES2015 promises. It can be used to await any thenable — that is, any object with a .then() method. This lesson illustrates how to await promises that have been created using a promise library.
  8. Iterate Asynchronously with the for-await-of Loop: We finish the course by looking at asynchronous iterators, a generic data access protocol for asynchronous data sources. This asynchronous iteration scheme is built on top of a new for-await-of loop and async generator functions.