Answer the question
In order to leave comments, you need to log in
Why js is not shown in the browser console?
async function getResponse()
{
let response = await fetch('https://jsonplaceholder.typicode.com/photos')
let content = await response.json()
content = content.splice(0, 10)
let list = document.querySelector('.posts')
let key;
for (key in content) {
list.innerHTML +=`
<li class="post">
<h4>${content[key].title}</h4>
<img src="${content[key].url}" width="300">
</li>
`
content[key]
}
console.log(content)
}
getResponse()
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question