浅拷贝深拷贝 浅拷贝 // 简单赋值运算:浅拷贝 var arr = [1,2,3,4] var newArr = arr; newArr.push(5) console.log(arr); 深拷贝 var arr = [{name:"lisi"},{name:"wangwu"}] var newArr = [...arr] arr[0].name = 'react' console.log(newArr);