Asynchronous JavaScript

Callbacks

Callbacks are functions passed as arguments to other functions to handle async tasks, sometimes causing callback hell.

Promises

Promises represent async outcomes and can be handled using .then(), .catch(), and .finally().

Async/Await

Async/await makes async code cleaner. Example: const data = await fetch(url).then(res => res.json()).