Deep Copy vs Shallow Copy
Shallow Copy:
A shallow copy creates a new object, but the properties of that object still refer to the same memory locations as the original object's properties. This is what happened in your array example
Deep Copy:
A deep copy creates a new obje...
javascript-fundamentals.hashnode.dev1 min read