JS - Async Programming
Async programming is used when code needs to wait for something without blocking the whole program.
Core Notes
- Asynchronous code
- callbacks
- Callback Hell
- Promise in JS
- Promise.all and Promise.race
- Async&Await
- Async Error Handling Patterns
- Error handling in JS
- setTimeout() setInterval()
Progression
| Level | Pattern | Main idea |
|---|---|---|
| 1 | callbacks | pass a function to run later |
| 2 | promises | represent a future value |
| 3 | async/await | write promise-based code like synchronous code |
| 4 | error handling | handle failed async work cleanly |