let myObject = {key : 'Add', array : [0, 2, 3]}
let clonedObject = Object.assign({}, myObject, {array: myObject.array})
clonedObject.array.pop()
console.log(myObject)
console.log(clonedObject)
In the above example, let's say we want to remove an element from the array in clonedObject. Using pop method affects both arrays.