const A = { a: 1, b: { c: { d: [1, 2, 3] } }};const B = A;這里B對(duì)象會(huì)是A對(duì)象的引用,改變B對(duì)象的值A(chǔ)對(duì)象也會(huì)變,對(duì)于這種嵌套很深的對(duì)象,如何生成一個(gè)B的新對(duì)象
ES6的對(duì)象復(fù)雜對(duì)象深拷貝
躍然一笑
2018-09-13 10:10:45