题解 | #简易深拷贝#
简易深拷贝
https://www.nowcoder.com/practice/3d436d07f5cb4b628a4dd7c12476cabe
const _sampleDeepClone = target => {
// 补全代码
if (typeof target !== "object" || typeof target === "null")
return target;
return JSON.parse(JSON.stringify(target))
}