对象的扩展运算符(...),用于取出参数对象中的所有可遍历属性,然后拷贝到当前对象之中 对象扩展运算符: 1. 复制对象 let obj1 = { x: 1, y: 2, z: 3 } let obj2 = { ...obj1 } obj2 = { x: 1, y: 2, z: 3 } 2. 合并对象 let obj1 = { x: 1, y: 2, z: 3 } let obj2 = { x: 4, y: 5, z: 6 } let obj3 = { ...obj1, ...obj2 } ob…