javascript most efficient way to deep clone an array of objects code example
Example 1: clone javascript object
let clone = Object.assign({}, objToClone);
Example 2: how to make a deep copy in javascript
JSON.parse(JSON.stringify(o))
let clone = Object.assign({}, objToClone);
JSON.parse(JSON.stringify(o))