// 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"发布,所有内容的版权归原作者所有。