fetch
Tue Feb 08 2022 13:13:51 GMT+0000 (Coordinated Universal Time)
Saved by
@mariya_sada
const tryToPractice =(url)=>{
fetch(url)
.then(res=>res.json())
.then(data=> console.log(data))
.catch(err=> console.error(`error from server ${err}`));
}
let url = "https://jsonplaceholder.typicode.com/users";
tryToPractice(url);
content_copyCOPY
Comments