2023-01-19 Vue shift():從數組中刪除第一個元素並返回刪除的元素。 shift():從數組中刪除第一個元素並返回刪除的元素。 const array1 = [1, 2, 3]; const firstElement = array1.shift(); console.log(array1); //1 console.log(firstElement); //[2,3] Newer replace() & replaceAll() Older splice:從數組中刪除或是取代,數量。