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

Prepare · Practice · Crack

How does async/await relate to promises?

Quick answer

It's syntax sugar over promises. An async function returns a promise; await pauses until a promise settles, without blocking the thread.

In detail

`await` reads like synchronous code but is non-blocking — it suspends the function and resumes when the awaited promise settles. Errors are handled with try/catch. Watch out for serialising independent awaits; run them together with Promise.all.

1async function load(id) {
2  try {
3    const [u, s] = await Promise.all([getUser(id), getStats(id)]);
4    return { u, s };
5  } catch (e) { handle(e); }
6}

Why interviewers ask this: Confirms you understand await isn't magic — it's promises.

This is 1 of 118+ questions in the JavaScript Interview Kit

Get every question with detailed answers, follow-ups and real code — plus coding challenges and a last-minute revision sheet. One-time payment, instant access.

⚡ Get the JavaScript Interview Kit → ₹299

Full kit

JavaScript Interview Kit · ₹299

Get it →