Understanding Deep and Shallow Copy in Javascript
Manjula Dube
5479

You missed a point, deep copy is just on the lowest object/array level. Nested properties(objects/functions) are always references!

eg. employeeDetailsOriginal = { ageΒ : {yearsΒ : 25} };
employeeDetailsDuplicate = { ageΒ : employeeDetailsOriginal.age };

here only the reference has been passed not value so changing one will change the other.

Detailed article otherwise.. πŸ‘

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.