var arr = [1,2,3]; // 遍历 for(var i=0;i<arr.length;i++){ console.log(arr[i]); } // 快速数组遍历 for(var item of arr){ console.log(item); } // 快速索引遍历 for(var item in arr){ console.log(item); }
数组快速遍历
猜你喜欢
转载自www.cnblogs.com/wwthuanyu/p/10973863.html
今日推荐
周排行