-
Asynchronous Programming:
- Understanding the differences between synchronous and asynchronous code execution.
- Working with callbacks and the challenges they present, such as the callback pyramid of doom.
-
Promises:
- Creating and using Promises in JavaScript.
- Promise states: pending, fulfilled, and rejected.
- Consuming promises using
then
,catch
, andfinally
methods. - Chaining multiple promises for sequential execution.
- Handling errors and understanding how promises handle rejected states.
- Using Promise-based libraries like Axios.
-
Async/Await:
- Simplifying asynchronous code using the
async
andawait
keywords. - Error handling in async functions using try-catch blocks.
- Using async/await for sequential and parallel API requests.
- Combining promises and async/await for more complex asynchronous flows.
- Simplifying asynchronous code using the
-
Advanced Promise Methods:
Promise.all
: Running multiple promises concurrently and waiting for all to complete.Promise.allSettled
: Handling all promises and capturing both resolved and rejected outcomes.Promise.any
: Returning the first resolved promise and handling multiple sources of data.Promise.race
: Handling the first settled promise, whether fulfilled or rejected.
-
HTTP Requests:
- Making HTTP requests using
XMLHttpRequest
and Fetch API. - Handling and configuring HTTP headers and status codes.
- Using AbortController to cancel requests.
- Understanding CORS and preflight requests.
- Making HTTP requests using