Не выводит список

<!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>

Привет понимаю что ответа тут как правило не бывает но возможно кто то сталкивался подобным,код не выводит список что в нем не так?

Can you please translate into English and edit your post? Thanks :slight_smile:

perhaps someone has come across a similar one, the code does not display a list, what is wrong with it?

The first thing you should do when your code isn’t working is check the DevTools console:

When I go back to my code editor to see what is going on, notice that the “C” in the variable declaration is a different “C” than what is being used in the next two lines:

If you make the “C” the same, that should get you further into seeing what may be wrong. One issue that I see is that “products” isn’t defined in your code:
products.append(newCardProduct);
You should make sure to associate a variable called products with your products id in the HTML.

Hope this helps!

Cheers,
Kirupa :slight_smile:

сработало спасибо.

Great. Please do translate your responses into English. It makes it easier for other users to follow along and benefit.