浅拷贝:
let obj = {};
let shadowObj = Object.assgin({}, obj);
深拷贝:
let obj = {};
let deepObj = JSON.parse(JSON.stringify(obj));
扩展链接:
浅拷贝:
let obj = {};
let shadowObj = Object.assgin({}, obj);
深拷贝:
let obj = {};
let deepObj = JSON.parse(JSON.stringify(obj));
扩展链接: