forEach语法: arr.forEach(function(value, index, array){--}) 实例: // forEach ,,,,]; arr.forEach(function(value, index, array){ array[index] *= ; }); console.log(arr); //[2,4,6,8,10] map语法: var newArr = arr.map(function(value, index, array){return 要放入新数组的…