ForgeFrontend — Prepare, Practice, Crack
Secure checkout
Lifetime access
Instant Drive delivery
Free updates forever

Prepare · Practice · Crack

JavaScript Promises & Async Interview Questions

Async JavaScript is the deciding round for many frontend roles. Here are the questions and clear answers.

What is a Promise and what are its states?

An object representing a future value, in one of three states: pending, fulfilled or rejected. Once settled it never changes. .then handles the value, .catch handles rejection, .finally runs either way.

Promise.all vs allSettled vs race vs any?

all resolves with all values but rejects on the first failure; allSettled waits for every outcome and never rejects; race settles as soon as any one settles; any resolves with the first fulfilment.

How does async/await relate to promises?

It's syntax sugar over promises. An async function returns a promise; await pauses the function until a promise settles without blocking the thread. Errors are handled with try/catch.

Microtasks vs macrotasks?

Microtasks (promise callbacks, queueMicrotask) drain completely after each macrotask (setTimeout, I/O, events) and before rendering — so .then always beats setTimeout(…, 0).

How do you handle errors in async code?

Use try/catch with async/await or .catch on chains. An unhandled rejection is a rejected promise with no handler — a common production bug. Note Promise.all rejects on the first failure.

How do you run independent async calls in parallel?

Don't serialise awaits. await a(); await b(); runs b only after a; if independent, await Promise.all([a(), b()]) runs them together — often a big speed-up.

Crack the async round

The event loop, promises, async/await and async coding problems — explained end to end in the JavaScript Interview Kit.

⚡ Get the JavaScript Interview Kit → ₹299

Frequently asked questions

What's the difference between parallel and serial awaits?
await in a loop runs serially. For independent calls, await Promise.all(items.map(...)) runs them together.
What is an unhandled promise rejection?
A rejected promise with no .catch and no surrounding try/catch. It can crash Node and is a frequent real-world bug.

Full kit

JavaScript Interview Kit · ₹299

Get it →