Fetch from APIs. Parse JSON. Handle async with Promises and async/await.
// Fetch data (async/await)
async function getMenu() {
const res = await fetch('https://api.coffee.com/menu');
const data = await res.json();
return data;
}
// JSON syntax
{ "name": "Latte", "price": 4 }
Always wrap fetch in try/catch. Handle loading and error states in the UI.
async/await reads like sync code but doesn't block the main thread.