- pop()
- push()
- slice(start?: number, end?: number) 截取段
- shift() 删除第一个
- unshift() 添加第一个
- splice(start: number, deleteCount?: number) 删除段并替换
- concat()
- reverse()
- sort() a-b为递增,b-a递减
- join()
- indexOf()
- forEach((value,idnex,arr)=>{})
- map() 通过return可修改值
- some()
- every()
- reduce()
let arr = [1,2,4]
console.log(arr.map((value,index)=>{value*=2;return value}));
console.log(arr.forEach((value,index)=>{value*=2;return value}));
console.log(arr.some((val)=>val>=3));
console.log(arr.every((val)=>val>0));
console.log(arr.reduce((sum,val)=>sum+val,0));