Explain async and await in JavaScript with an example.
Anonimo
async and await are syntactic sugar built on top of Promises, making asynchronous code easier to read and write. async: Declares a function to be asynchronous and returns a Promise. await: Pauses the execution of an async function until the Promise is resolved or rejected