Functions declared within loops referencing an outer scoped variable may lead to confusing semantics. What is wrong? [duplicate]
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试): 问题: This question already has an answer here: 37 answers Can someone tell me what is wrong with my code, especially the "Full screen event" part. Thanks! JSLint says "Functions declared within loops referencing an outer scoped variable may lead to confusing semantics." function initialize() { var mapProp = { center: new google.maps.LatLng(45.502808, -73.571486), }; var map = []; map[0] = new google.maps.Map(document.getElementById("map1"), mapProp); map[1] = new google.maps.Map(document.getElementById("map2"), mapProp); map[2] = new google.maps