I think the 'Deep Copy Object' heading is a bit misleading because the spread operator cannot do deep copying of objects. For example, if you have an object with nested objects, the spread operator will not be able to deeply copy the nested object.
The address property in person 2 will still have a reference to the address property in person 1, meaning if the address in person 1 changes, address in person 2 will also change.
I think the 'Deep Copy Object' heading is a bit misleading because the spread operator cannot do deep copying of objects. For example, if you have an object with nested objects, the spread operator will not be able to deeply copy the nested object.
The address property in person 2 will still have a reference to the address property in person 1, meaning if the address in person 1 changes, address in person 2 will also change.
Thanks for pointing out :) Updated the article (y)