Async/Await

The async/await syntax allows you to work with asynchronous code in a more readable way.

Snippet:

async function fetchData() { const response = await fetch(url); const data = await response.json(); return data; }

Example:

const result = await someAsyncFunction();