forEach()
forEach()中function回调有三个参数
第一个参数:遍历的数组内容,
第二个参数:对应的数组索引,
第三个参数:数组本身
let arr=[1,2,3];
arr.forEach(function(value,index,array){
console.log(value,index,array);
});

let arr=[{name:'a'},{name:'b'}];
arr.forEach(item => {
console.log(item.name)
});
