// Object.assign let a = {a: 1, b: 2}; let b = Object.assign({}, a); // ... let a = {a: 1, b: 2}; let b = {...a}; // slice let a = [1, {a: 1}]; let b = a.slice(); // concat let a = [1, {a: 1}]; let b = [].concat(a);
// Object.assign let a = {a: 1, b: 2}; let b = Object.assign({}, a); // ... let a = {a: 1, b: 2}; let b = {...a}; // slice let a = [1, {a: 1}]; let b = a.slice(); // concat let a = [1, {a: 1}]; let b = [].concat(a);
本文是由用户"admin"发布,所有内容的版权归原作者所有。没有经过书面许可,任何单位或个人不得以任何形式复制、转载、引用本网站的内容。否则将追究法律责任。