By reference (Definition)

A means of passing data to functions, methods. and property accessors.

Passing a value by reference means that you pass a pointer to the data value. This means that when you copy the reference to another variable, you then have two variables pointing at the same data.

The data for both is identical. Modifying the data value pointed at by one, changes the value for the other variable also.

Non-primitive values (objects) are passed in this manner.

Note that although JavaScript has a good pass-by-reference technique built-in to the implementation, it does not support pointers as a specific data type as the C language does.

Passing a value by reference into a function allows the function to make changes that are visible outside the function.

In JavaScript, you cannot manipulate these parameter passing mechanisms. It will choose to pass by value or by reference according to the data type of the value being put into the argument. This is often the result of evaluating an expression. JavaScript takes care of all the type conversions for you.