Laya for...in和for each...in

当for...in和for each...in同时作用于一个对象时,for...in 获取的是key, for each...in获取的是value

 

for each(var i in loadInfo){

}

等同于:

for(var $each_i in loadInfo){

  i=loadInfo[$each_i];

}

posted @ 2019-02-25 21:15  ixenos  阅读(250)  评论(0编辑  收藏  举报