just like angular *ngFor, I want to implement in vanila js and print whole array of object properties on one div
I have tried this but this doesn't work for me
for(let skipques of arr){
var elem = document.createElement("p");
elem.setAttribute('Id',arr.ques);
document.body.appendchild(elem);
}
let arr = [
{ques: 2},
{ques: 5},
{ques: 8},
{ ques: 10}
];
<div id="questId"></div>
I want to list all ques value on div because this array of object is dynamic