JavaScript Concurrency
Callbacks, promises, async/await and event loops.
About This Course
You'll Learn
The three ways of expressing concurrency in JavaScript: callbacks, promises, and async/await.
We also cover some important related topics, like how event loops work.
There are 33 lessons containing 222 code examples. Most people finish this course in 5 hours over 8 calendar days.
Prerequisites
Basic JavaScript knowledge like variables, functions, if, and loops.
Level 1
Concurrent setTimeouts
setTimeout and Functions
clearTimeout
Sequential setTimeouts
Promise Then
Omitting Promise Values
Level 2
Locked
Promises Are Asynchronous
What's Inside a Promise?
Rejecting Promises
Catching Promise Rejections
Promise Constructor
Promise Cleanup With Finally
Promise Constructor Is Synchronous
Level 3
Locked
Recovering From Rejection
Promises Resolving to Promises
Saving the Resolve Function for Later
Running Promises Concurrently
Event Loops
Promise.all
Promise allSettled
Level 4
Locked
Promise States
setInterval and clearInterval
Canceling Promises
Async Await
What's Inside a Timeout?
Sleep
Async/await in Arrow Functions
Level 5
Locked
Control Flow With Promises
Multiple Awaits
Control Flow With Async/await
Async/await Gotchas
Error Handling in Async Functions