语法:arr.Fn(callback[, thisArg])
1.不提供返回值:
foreach
2.提供返回值,返回新数组:
filter、map
3.提供返回值、返回布尔值:
every、some
4.提供返回值,返回数组的某个元素或索引:
find、findIndex
5.提供返回值,返回累积值:
reduce、reduceRight
语法:arr.Fn(callback[, thisArg])
1.不提供返回值:
foreach
2.提供返回值,返回新数组:
filter、map
3.提供返回值、返回布尔值:
every、some
4.提供返回值,返回数组的某个元素或索引:
find、findIndex
5.提供返回值,返回累积值:
reduce、reduceRight
本文标题:数组之ES5 方法
本文链接:https://www.haomeiwen.com/subject/toywjftx.html
网友评论