
async/await is syntactic sugar on top of Promises that makes asynchronous code look and read like synchronous code. Mark a function async and use await before any Promise to pause execution until it resolves. Wrap in try/catch to handle errors. This is the preferred way to write async JavaScript in 2024.
Reference:
TaskLoco™ — The Sticky Note GOAT