Javascript deep copy using JSON.parse and JSON.stringify

前端 未结 0 1648
谎友^
谎友^ 2021-01-11 12:57

Is the below method a foolproof way of deep copying an object in Javascript i.e. even for very deeply nested objects/arrays ?

let newObj = JSON.parse(JSON.str         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题