← Back to JavaScript exercises

43. Fetch API

Result appears here
button.onclick=()=>fetch("https://jsonplaceholder.typicode.com/users/1").then(r=>r.json()).then(x=>output.textContent=x.name);