forEach(函数)遍历数组 2018-07-10 本文已影响0人 司马皮砸瓜 var arr=[10,20,30,40,50]; arr.forEach(function (ele, index) { console.log(ele+'------'); });