I have some variables that their name ends with a number. now I need to change their values in a loop.
instead of putting all of the variables in the loop I was wondering if there is a way to generate the name of a variables in the loop? something like this maybe?
let bla1 = 0
let bla2 = 1
let bla3 = 2
...
for(var i = 0; i<somearray.lenght; i++){
bla[i] += 1
}
I'm pretty sure I have seen something similar somewhere. what is the best way to do this?