Array数组[5]

[5]数组API[4]

Iteration Methods

1 这部分将要介绍的API主要是以下几个:

Array.prototype.forEach()
Array.prototype.every()
Array.prototype.some()
Array.prototype.filter()
Array.prototype.map()
Array.prototype.reduce()
Array.prototype.reduceRight()

*上面列举的API都是用于遍历数组,这一部分的API比较容易混淆,需要理解清楚。

Array.prototype.forEach()

Array.prototype.every()

Array.prototype.some()

Array.prototype.filter()

####Array.prototype.map()

####Array.prototype.reduce()

####Array.prototype.reduceRight()