JavaScript Tutorial

JavaScript Async

Async / Await

Handle asynchronous operations with Promises and async functions.

async function load() {
  const res = await fetch("/api/courses");
  return res.json();
}