<script>
var products = [
{
name : "농구공",
price : 100000,
seller : "조던",
imageUrl : "./images/products/basketball1.jpeg"
}, {
name : "축구공",
price : 50000,
seller : "메시",
imageUrl : "./images/products/soccerball1.jpg"
}, {
name : "키보드",
price : 10000,
seller : "그랩",
imageUrl : "./images/products/keyboard1.jpg"
},
];
let productsHtml = ' ';
for(var i = 0; i < products.length; i++) {
productsHtml =
productsHtml +
'<div class="product-card">' +
"<div>" +
'<img class="product-img" src="./images/products/basketball1.jpeg">' +
"</div>"
'<div class="product-contents">' +
'<span class="product-name">농구공 1호</span>' +
'<span class="porduct-price">50000원</span>' +
'<div class="product-seller">' +
'<img class="product-avatar" src="./images/icons/avatar.png">' +
"<span>KDY</span>" +
"</div>" +
"</div>" +
"</div>";
}
document.querySelector("#product-list").innerHTML = productsHtml;
</script>
</html>
해당 코드를 작성 후에 아래 사진처럼 나오는데 코드가
잘못된게 있는건가요??