var a=[1,2,2,3,4];
console.log(a);
a.shift();
console.log(a);
(5) [1, 2, 2, 3, 4]
(4) [2, 2, 3, 4]
pop:刪除原數組最后一項,並返回刪除元素的值;如果數組為空則返回undefined
shift:刪除原數組第一項(相當於lpop)
push:將參數添加到原數組末尾,並返回數組的長度
reverse:將數組反序
sort(orderfunction):按指定的參數對數組進行排序
slice(start,end):返回從原數組中指定開始下標到結束下標之間的項組成的新數組
