javascript - Trying to create a ton of variables and a for loop won't work -
so, working on javascript need create hundreds of variables going hold urls. make of them in loop, of variables local variables. there way make work or work arounds possibly use?
like @slaks said, create array variable outside of loop. push url variables array create them. ex:
var arr = []; for(var i=0; i<10; i++) { var url = "www.something.com"; arr.push(url); }
Comments
Post a Comment