We're going to start off by looking at the different states that a promise can be in. We'll then put together our first promise chain using the then method. Next, we're going to look at how to catch errors in a promise chain.
Throughout this course, we're going to focus a lot on error handling, as many asynchronous operations fail all the time. We're also going to learn how to use the finally method to run cleanup code in a promise chain no matter if there was an error or not.
Next up, we're going to look at how to create a rejected promise using the Promise.reject method. We're then going to see how we can use the Promise.resolve method to convert any promise-like object to a proper native promise.
Alternatively, we can create a new promise from scratch using the promise constructor. We're also going to explore Node.js' util.promisify helper, which lets us convert a callback-based function to one that uses promises.
Towards the end of the course, we're going to learn how to work with multiple promises. We can call the Promise.race method to wait for the fastest promise to settle. Similarly, we can call the Promise.all method to wait for all promises to settle.
Finally, we're going to learn how to use async functions and the await operator to write asynchronous code that is almost as easy to read as synchronous code. Thanks for watching and enjoy the course.