When the assignment operator works on primitive values (numbers, strings, Boolean, null, and undefined), a copy of the value is made.When the assignment operator works on JavaScript objects, references to the objects are copied.