Skip to main content

Asynchronous JavaScript for Frontend Developers

Asynchronous JavaScript is how the language handles work that finishes later, such as network calls and timers, without freezing the page. The event loop runs one task at a time and picks up callbacks, promises and async/await continuations from queues when the call stack is empty.

Stage: JavaScript and TypeScript · Part of the Frontend Developer roadmap · Last reviewed 19 November 2026

What to learn in Asynchronous JavaScript

Asynchronous JavaScript interview questions

Why does a promise callback run before a setTimeout of zero?

Promise callbacks go into the microtask queue, which the event loop drains completely after the current task. A setTimeout callback goes into the macrotask queue and waits for the next turn. So microtasks always run first, even when the timer delay is zero.

What is the difference between Promise.all and Promise.allSettled?

Promise.all resolves with every result only if all promises succeed, and rejects as soon as one fails. Promise.allSettled always waits for all of them and returns a status and value or reason for each. Use it when partial failure is acceptable.

Where Asynchronous JavaScript fits in the Frontend Developer roadmap

Asynchronous JavaScript belongs to the JavaScript and TypeScript stage (beginner level), which takes about 5 hours. The language of the browser, and the type system that keeps large codebases sane.

Back to the full Frontend Developer roadmap