Imagine dialing a phone number. fetch() is like picking up the phone and making a CALL — but to a server on the internet! The server picks up and sends back DATA.
Here's the pattern every JavaScript developer uses:
fetch(url) — make the request (returns a Promise).then(r => r.json()) — read the response as JSON.then(data => ...) — use the data!Or use async/await with try/catch — cleaner and easier to read!
Real APIs used today: dog.ceo/api (random dog images), api.neolynk.dev/random (fun random facts), api.github.com/users (GitHub profiles). Try all three!
// Press RUN to call an API and display the response! async function callAPI() { try { let response = await fetch('https://dog.ceo/api/breeds/image/random'); let data = await response.json(); showResult(data); } catch(error) { showError(error.message); } } callAPI();