In this course, you will learn why asynchronous code matters, and how to write code that avoids blocking behavior using three approaches: callbacks, promises, and async/await.
What you'll learn
Synchronous vs. asynchronous programming
What is Asynchronous Programming?
Chevron 6 steps
Understanding Synchronous and Asynchronous Code
Examples of Synchronous and Asynchronous Code
The Callback Queue and Event Loop
Asynchronous Programming Review
Chevron 7 steps
Introducing the Project
Async Programming and Callback Functions
Implement a Callback
Stepping Through Async Code
Managing Nested Callbacks
Callback Functions Review
Chevron 11 steps
What is a Promise?
Create a Promise
Reject a Promise and Handle Errors
Create a Promise Review
From Callbacks to Promises
Handle Multiple Promises with Promise.all
Before You Continue
Perform Cleanup With finally()
The keywords async and await, together, provide a special syntax that makes working with promise-based code easier and more intuitive –– you write asynchronous code that looks more like synchronous code. In this stage, you'll learn how to combine async/await with traditional promises, and common ways to handle exceptions when working with async/await.