how to deep clone objects in javascript code example
Example 1: deep clone object javascript
JSON.parse(JSON.stringify(object))
Example 2: clone javascript object
let clone = Object.assign({}, objToClone);
JSON.parse(JSON.stringify(object))
let clone = Object.assign({}, objToClone);