Javscript Loop / Array / Variable question
Posted
by Chris Chiera
on Stack Overflow
See other posts from Stack Overflow
or by Chris Chiera
Published on 2010-06-11T16:11:11Z
Indexed on
2010/06/11
16:12 UTC
Read the original article
Hit count: 343
Hi. I'm trying to get this to work and I hope this isn't too vague. -Chris
var example = new Array();
var test1 = "one";
var test2 = "two";
var test3 = "three";
for (v = 1; v <= 3; v++) {
alert(example[test + v])
}
© Stack Overflow or respective owner