There are two initialisation and no "x<y
" to limit the iterations. So how does this loop work?
var features = [{
position: new google.maps.LatLng(-33.91721, 151.22630),
type: 'info'
}, {
position: new google.maps.LatLng(-33.91539, 151.22820),
type: 'info'
}, {
position: new google.maps.LatLng(-33.91747, 151.22912),
type: 'info'
}];
for (var i = 0, feature; feature = features[i]; i++) {
addMarker(feature);
}