async function load() {
document.getElementById("posts").innerHTML = "Loading..."
let req = await fetch('https://jsonplaceholder.typicode.com/users')
let json = await req.json();
const list = json.map(res => {
document.getElementById('posts').innerHTML = JSON.stringify(res)
})}
When I do the map() to go into all the items in the JSON, it gives me only the last item instead to give me all of them.
But when I console log it, it gives me all of the items
I want to know how I "print" all of the items in the posts div.