I need to create dynamic variable name in js inside for loop
var counter = 0;
for(i=0; i<location.length; i++) {
...
var "marker_" + counter = new google.maps.Marker({
But when i expected to have variables marker_0,marker_1,marker_2,... i had this error
Error: SyntaxError: missing variable name
Source Code:
var "marker_" + counter = new google.maps.Marker({
Question&Answers:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…