Async JavaScript and Web APIs

Learning Path ⋅ Skills: Timers and Callbacks, Event Loop, Events, Promises, Async and Await, Concurrency, Timeouts and Cancellation, Async Error Handling, HTTP Requests, Web APIs

A developer catches a data card from a machine labeled FETCH and RESOLVED, beside an EVENT LOOP wheel and a conveyor of PROMISE capsules driven by an AWAIT lever

This learning path is for you if you’ve finished Intermediate JavaScript, or can already build programs with modules, closures, errors, and classes, but haven’t written code that waits or called a real API. You’ll need Node, a terminal, and any editor.

You’ll start with timers, callbacks, and events, and see how the event loop decides what runs next. Then you’ll move on to promises and async and await, run several tasks at once, and give slow work a deadline or cancel it. Last, you’ll look underneath fetch() at raw HTTP and combine data from real web APIs.

Each course tells one story and stands on its own. Exercises in the browser check your code with tests, and each course ends with a project and a quiz. In the last course, you build a planner from a brief without a walkthrough, then a program of your own.

Async JavaScript and Web APIs

Learning Path ⋅ 1 Resource

Is this path right for you? Mentor AI knows what’s in it and can help you decide where to begin.

Write Code That Waits

Start with how JavaScript waits without freezing. You’ll schedule and cancel work with timers, follow each callback through the event loop, handle results with error-first callbacks, and notify listeners with events. Then you’ll run a shared house’s laundry room, where reminders arrive late until you split a long job into chunks.

Turn Callbacks Into Promises

Callbacks get hard to follow once one step depends on another. Here, you’ll wrap them in promises, chain steps with a single error handler, and rewrite the chain with async and await. You’ll also add microtasks to your picture of the event loop and plan a family’s day at the museum.

Run Async Work Together and Cancel It

Now that you can await one result, you’ll decide how much work waits at once. You’ll start tasks together or one at a time, report partial failures, give slow work a deadline, and cancel it with AbortController. Then you’ll make sure two taps on one button run the routine once.

Call Real Web APIs With fetch

Finally, you’ll look at what travels between your program and a web API. You’ll read raw HTTP, send requests with fetch(), and check every status and response shape. Then you’ll combine two real APIs into a long weekend planner that you build from a brief, without a walkthrough.

Test Your Knowledge

You’ve made it through the whole path! In the wrap-up quiz below, you’ll revisit the event loop, callbacks and events, promises and async functions, running work together, timeouts and cancellation, and calling web APIs with fetch(). Use it to spot any topics that still feel shaky.

Title image for Async JavaScript and Web APIs (A developer catches a data card from a machine labeled FETCH and RESOLVED, beside an EVENT LOOP wheel and a conveyor of PROMISE capsules driven by an AWAIT lever)

Interactive Quiz

Async JavaScript and Web APIs

Check what you learned on the Async JavaScript and Web APIs path, from the event loop and promises to timeouts and calling APIs with fetch().

Congratulations on completing this learning path! You can now predict when timers, callbacks, and promise handlers run, write async code with await, and run tasks together while handling failures, timeouts, and cancellation.

You can also read an API’s docs, send requests with fetch(), and check every response’s status and shape. You know how to combine data from real web APIs into a program that copes with slow and failed requests.

You might also be interested in these related learning paths:

Got feedback on this learning path?

Looking for real-time conversation? Visit the RealJS Community Chat or join the next “Office Hours” Live Q&A Session. Happy coding!

« Browse All Learning Paths