How is async/await different from Promises?

Learn how async/await simplifies asynchronous JavaScript code built on top of Promises.

intermediateIntermediate conceptsjavascriptasync/awaitpromises
Published: 11/3/2025
Updated: 11/3/2025

Question

How is async/await different from Promises?


Answer

async/await is syntactic sugar built on top of Promises.

async function fetchData() {
  try {
    const res = await fetch('/api/data');
    const data = await res.json();
    console.log(data);
  } catch (err) {
    console.error(err);
  }
}

It makes asynchronous code look synchronous, avoiding deeply nested .then() chains.

Real-World Example

Used extensively in React, Next.js, and Node.js for API fetching and async data handling.

Quick Practice

Convert a Promise-based function into one using async/await.

Summary

Async/await simplifies async control flow, reduces callback nesting, and improves readability.

Related Videos
Watch these videos to learn more about this topic
Frequently Asked Questions

Can I use await outside async functions?

No. await only works inside async functions (or top-level in ES2022+).


Stay Updated

Get the latest frontend challenges, interview questions and tutorials delivered to your inbox.