Skip to content

Module 04: Asynchronous JavaScript

The event loop, call stack, task/microtask queues, callbacks, Promises, async/await, and error handling for asynchronous code.

This module is planned. Full content coming soon.

Prerequisites

  • Module 03: Objects and Prototypes

What You'll Learn

  • How the JavaScript event loop works: call stack, Web APIs / Node.js APIs, macrotask queue, microtask queue
  • Callbacks: the original async pattern, callback hell, and why it was replaced
  • Promises: the three states (pending, fulfilled, rejected), .then(), .catch(), .finally(), chaining
  • async/await: syntax, error handling with try/catch, common pitfalls (forgetting await, sequential vs. parallel)
  • Promise.all, Promise.allSettled, Promise.race, Promise.any
  • AbortController for cancellable async operations