I am trying to append elements with multiple values from my array, but i am doing something wrong. This is my code:
for(var i=0; i < pricesArray.length; i++) {
var ulList = document.getElementById('season-prices');
ulList.append(`
<div class="flex"> <input type="checkbox"></input> <span>` + pricesArray[i].start_date `</span> <span>` + pricesArray[i].end_date `</span>
<span>` + pricesArray[i].currency `</span> <span>` + pricesArray[i].price `</span> </div>
`)
}
The error I get is:
pricesArray[i].start_date is not a function
Is there another way, or a better way to do this? I used to do something like this in jQuery but cannot remember where and how exactly..