如何把下面forEach循环改成for循环:v.cityData.forEach(function(e){letname=e.name.substr(0,1);letlen=e.cities.length;v.anchorMap[name]=y;y-=titleHeight+len*itemHeight;});
v.cityData.forEach(function(e){letname=e.name.substr(0,1);letlen=e.cities.length;v.anchorMap[name]=y;y-=titleHeight+len*itemHeight;});
letname=e.name.substr(0,1);letlen=e.cities.length;v.anchorMap[name]=y;y-=titleHeight+len*itemHeight;});
letlen=e.cities.length;v.anchorMap[name]=y;y-=titleHeight+len*itemHeight;});
v.anchorMap[name]=y;y-=titleHeight+len*itemHeight;});
y-=titleHeight+len*itemHeight;});
});
慕容森
白猪掌柜的
相关分类