数组的新方法 forEach some filter findIndex

forEach  some  filter  findIndex这些都属于数组的新方法,都会对数组中的每一项,进行遍历,执行相关的操作;

只不过在循环的时候有些不一样

参考资料:https://wangdoc.com/javascript/stdlib/array.html#filter

猜你喜欢

转载自www.cnblogs.com/songsongblue/p/11723054.html
今日推荐