Call by Reference:
Let’s say, we have an object stored in the variable “a”. The variable stores the location or the address where the object lives. Now we set b=a. Now that new variable “b” instead of pointing to a new location in the memory, points to the same location where “a” does. No new object is created, no copy is created. Both the variables point to the same object. This is like having 2 names. This is call by reference. It behaves quite differently from by value. All objects interact by reference.

Features of By reference:
In JavaScript, all objects interact by reference.

If an object is stored in a variable and that variable is made equal to another variable then both of them occupy the same location in memory.
Changes in one object variable affect the other object variable.
// By reference (all objects (including functions))
var c = { greeting : 'Welcome' };
var d;
d = c;
// Mutating the value of c
c.greeting = 'Welcome to geeksforgeeks';
console.log(c);
console.log(d);
Output:
{ grating : " welcome to greekforgreeks"}
{ grating : " welcome to greekforgreeks"}

Example:
Over here, when we set d=c, “d” points to the same location in memory where “c” does. At first, we have a name-value pair stored in “c”. Now when we change a property using “c”, it changes the property in “d” also because both point to the same object. Changes in one it affects.