Published
- 1 min read
Fetch Await
The solution for this is noted below
Fetch Await
Solution
async function handleFetchAwait(id) {
let response = await fetch(`https://samplesite.com/users_id/${id}`)
let data = await response.json()
return data
}
handleFetchAwait(21).then((data) => console.log(data))
Try other methods by searching on the site. That is if this doesn’t work