(Deep) Cloning Objects in JavaScript

Even when you pass an object to a function or method, you are passing this object by reference, not the value.

If you pass (or copy) an object by reference and then change any property, the ‘source’ object’s property also changes.

CategoriesUncategorized