Skip to content

Async/Await

async/await is syntactic sugar over Promises. It lets you write asynchronous code that reads like synchronous code.

  • async makes a function return a Promise
  • await pauses until the Promise resolves
  • Error handling uses try/catch
  • Use Promise.all() for parallel operations