Ok, I have a literal arrays where there are some images in it. I have an empty DIV where a FOR LOOP will be carried out to display all the images in the array in the div.
var icons = [
'<img src="images/1.png" width="30" height="30"/>',
'<img src="images/2.png" width="30" height="30"/>',
'<img src="images/3.png" width="30" height="30"/>'
];
var lol = document.getElementById("div");
for (var i=0; i<icons.length; i++) {
lol.innerHTML = icons[i] ;
}
The issue is only the last image is displayed not all...
innerHTML.