I'm working on an ajax google maps script and I need to create dynamic variable names in a for loop.
for (var i = 0; i < coords.length; ++i) {
var marker+i = "some stuff";
}
What I want to get is: marker0
, marker1
, marker2
and so on.
and I guess there is something wrong with marker+i
Firebug gives me this: missing ; before statement