How can i use async/await in javascript?

The `async` and `await` keywords allow you to work with promises in a more synchronous-looking manner. Example:

async function fetchData() {
    let response = await fetch('https://api.example.com/data');
    let data = await response.json();
    console.log(data);
}

fetchData();
This function fetches data from an API and logs it. The `await` keyword causes the function execution to pause until the promise is resolved.

Beginner's Guide to JavaScript