async function getResponse() {
let response = await fetch('https://dummyjson.com/products')
let jsonList = await response.json()
console.log(jsonList)
let list = document.querySelector('.products')
let key
for (key of jsonList.products) {
list.innerHTML +=
`<li class="item">
<p>${key.title}</p>
<img src="${key.thumbnail}" alt="${key.title}">
</li>`
}
}
getResponse();