var obj = { a: 1 }; var copy = Object.assign({}, obj); console.log(copy); ... 深層複製(deep clone)需要使用其他的替代方案,因為 Object.assign() 僅複製屬性值 ...
確定! 回上一頁