so i have an array with 4 images and I use javascript to load them in. Therefore I have created an "img" element using document.createElement("img")
I also used a forloop to push all 4 images.
I know how to give them a class with .className = ""; but i dont know how to give them all a seperate id in Javascript
How do I do that?
See Question&Answers more detail:os