不改变和改变原数组的方法
1.不改变原数组的方法
join(),
concact(),
slice(),
map(),
let arr= [1,2,3,4];
let res = arr.map(x => {
return x*2;
})
console.log(arr) //[1,2,3,4]
filter();
2.改变原数组的方法
push(),
pop(),
shift(), //弹出数组第一位
unshift(),//数组第一位压入
sort(),
reverse(),
splice()

浙公网安备 33010602011771号