Possible Duplicate:
Convert string to variable name in Javascript
I have different variables (var1, var2, var3,.., to var10). I want to update them using a for loop like this:
for(var i=0; i<10;i++){
var+i = i+20;
}
To obtain something like this:
var1 = 21;
var2 = 22;
var3 = 23;
...
var10 = 30;
My issue consists I can't concatenate the name of the variable with its id/position. Any suggestions?