Hi I need to create a load of variables in a javascript loop so say my loop goes round 5 times starting at 0 by the end of it the following variables should be defined:
variable_0
variable_1
variable_2
variable_3
variable_4
Can anyone tell me how to do this please?
This will create “global” variables by registering them on the
windowobject:It’s not really nice to do that though =/ a better way is to define an object in which you create dynamic properties.