Beyond literals, any Object in JavaScript (including functions, arrays, regexp etc) are references.

Mutations are across all references

var foo = {};
var bar = foo; // bar is **a reference to the same object**

foo.baz = 123; // asign a new property to foo
console.log(bar.baz); // 123

Here we provide foo as a value to bar which is a reference to the same object: foo.

If we asign a new property to foo, bar gets the same property.

Equality is for references

var foo = {};
var bar = foo; // bar is a reference
var baz = {}; // baz is a *new object* distinct from `foo`

console.log(foo === bar); // true
console.log(foo === baz); // false

objects are reference. Only equality between references can be true.