All questions
Coding

Promises vs async/await in JavaScript

A Promise represents a value that will be available later — it is pending, then either fulfilled or rejected. You consume it with .then() and .catch() handlers.

async/await is syntactic sugar over Promises. An async function always returns a Promise, and await pauses the function until a Promise settles, letting you write asynchronous code that reads top-to-bottom like synchronous code. Under the hood it is still Promises — await is roughly equivalent to chaining .then().

The practical difference is readability and error handling. With Promises you chain .catch(); with async/await you use try/catch, which many find clearer for sequential steps. Use Promise.all() (with or without await) when you want operations to run concurrently rather than one after another. A common interview follow-up is to note that awaiting in a loop runs serially, while mapping to Promises and awaiting Promise.all runs them in parallel.

Practise this live with NostrobeAI

Get real-time, structured guidance for coding, system design, and behavioral interviews. Free trial, no subscription.

Download Free Trial