Array.prototype.concat(). 和slice類似 let arr = [1,2,3,4]; let copy = arr.concat(); arr[0] = 0; console.log(arr,copy); //[0,2,3,4],[1,2,3,4] ...
確定! 回上一頁