dragonturtle
Programmer
Hi,
is it possible to create variable names in a loop? For example, in the following loop I'm trying to create variables named V0, V1, V2, etc. and assign them values 0, 1, 2, etc., but V+i doesn't work.
I cannot use an array because these variables are going to be applied to a formula queried from a database (e.g. if the formula is V0*V1+V2, the page will show a result of 2 in this case).
Thanks.
is it possible to create variable names in a loop? For example, in the following loop I'm trying to create variables named V0, V1, V2, etc. and assign them values 0, 1, 2, etc., but V+i doesn't work.
Code:
for (i=0; i<10; i++){
var V+i = i;
}
I cannot use an array because these variables are going to be applied to a formula queried from a database (e.g. if the formula is V0*V1+V2, the page will show a result of 2 in this case).
Thanks.