//浅拷贝: let arr=[1,2,3,4] let arr2=arr arr[3]=0 console.log(arr,arr2) //output: (4) [1, 2, 3, 0] (4) [1, 2, 3, 0] //深拷贝1: var arr3=[1,2,3,4] var arr4=[] for(var i=0;i<arr.length;i++){ arr4.push(arr3[i])} console.log(arr4) //output: (4) [1, 2, 3, 4] //…