var products = [
{ id : 0, price : 70000, title : 'Blossom Dress' },
{ id : 1, price : 50000, title: 'Springfield Shirt' },
{ id : 2, price : 60000, title: 'Black Monastery' }
];
for (let i = 0; i <= products.length; i++) {
$('.title').eq(i).html(products[i].title);
$('.price').eq(i).html(products[i].price);
}
코드는 이렇게 작성되어있습니다 변수선언을 잘해준것같은데 헷갈립니다!
이거는 product[0].title 을 console에 쳤을때입니다.
