I am running a loop, and I am trying to create a variable each time the loop runs with the number of the counter appended to the end of the variable name.
Here's my code:
var counter = 1;
while(counter < 4) {
var name+counter = 5;
counter++;
}
So after the loop runs there should be 3 variables named name1, name2, and name3. How can I append the counter number to the end of the variable I am creating in the loop?