Mission 09 / Async JavaScript
Live API Data
Request developer articles, wait for the response and keep the interface useful during success, empty and error states.
Hard150 XPfetch()async/awaittry/catch
Request flow
Fetch returns a Promise
An async function can pause at await while the request completes. A successful network response still needs an explicit response.ok check before JSON is read.
const response = await fetch(url);
if (!response.ok) throw new Error("Request failed");
const data = await response.json();
Interactive task
Search live developer articles
Search for a topic to load live articles.
After trying the form, explain aloud where loading starts, where errors are caught and how each article becomes a DOM card.