#await

Async/Await

Async/await is syntactic sugar on top of Promises. It lets you write asynchronous code that reads like synchronous code — no more .then() chains. Under the hood, it’s still promises, but the code is dramatically easier to read and reason about. The Basics Mark a function as async, then use await inside it to pause until a promise resolves: async function getUser(id) { const response = await fetch(`/api/users/${id}`); const user = await response. Read more →

May 18, 2026