Hi! I’m trying to figure out how to write:
const file0 = document.getElementById(“file0”)
const file1= document.getElementById(“file1”)
etc…
without writing it out 10 times.
So far my code is:
const files = [ ]
for (let i = 0; i <= 9; i++){
files[i] = “file” + i;
}
which helps me to make an array but it doesn’t pull the elements from the HTML