<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="cont">
<h3>Список товаров</h3>
<div id="products">
</div>
</div>
<script>
let arrProducts = [
{id:1, name:"Вилка", price:2000},
{id:2, name:"Ложка", price:2000},
{id:3, name:"Тарелка", price:2000},
{id:4, name:"Стакан", price:2000},
];
for(let product of arrProducts){
let newСardProduct = document.createElement("div");
newCardProduct.innerHTML = `<h3>${product.name} </h3> <div>${product.price} </div>`;
newCardProduct.innerHTML += `<div><button> edit </button> <button> del </button></div>`;
products.append(newCardProduct);
}
</script>
</body>
</html>
Привет понимаю что ответа тут как правило не бывает но возможно кто то сталкивался подобным,код не выводит список что в нем не так?