ES5 方法总结 1.slice let arr = [2,4,434,43]; let arr1= arr.slice();//let arr1 = arr.slice(0); arr[0] = 'a'; console.log(arr,arr1); // [a,4,434,43] [ 2, 4, 434, 43 ] 2. 遍历数组 Array.prototype.clone = function(){ let a=[]; for(let i=0,l=this.length;i<l;i++)…