变异性数组方法 和 非变异性数组方法

2021-07-26  本文已影响0人  浅浅_2d5a

变异性数组方法 就是执行方法后,改变了原数组
push
pop
shift
unshift
splice
sort
reverse

非变异性方法 会返回新的
filter
map
slice
concat

上一篇 下一篇

猜你喜欢

热点阅读