</div>
<script>
let list = [];
let ob={};
for(i=0; i<100; i++){
list[i] = {
name: i,
text: "text"
}
//document.getElementById('results').innerHTML += list[i].name + list[i].text + '<br/>'
}
console.log(list)
var lising = document.getElementById('results');
lising.innerHTML = list
</script>
</body>
in above code i can print the array inside the loop but when i try to print it outside, it prints [object object]
") – Leo Sep 23 '20 at 14:17