htmlcssnewbie
02-07-2008, 11:05 AM
Say I have 3 javascript variables called Var1, Var2, and Var3, respectively. I want to pass each variable, one at a time, to a function called Ite. But I don't wish to call each variable in static fashion. Is there a way I can take advantage of the numerical nature of said variables and iterate from 1 to 3, calling these variables dynamically?
I'd like to do something like this:
function Ite(Var + num) // where Var + num is equal to the Var1, Var2 , or Var3
{
// do some stuff with the variable
}
thank you.
I'd like to do something like this:
function Ite(Var + num) // where Var + num is equal to the Var1, Var2 , or Var3
{
// do some stuff with the variable
}
thank you.