The equality operator
== compares two objects’ values, returning
true if they contain the same values for every property.
The equality operator compares two objects' values
The equality operator compares two objects' references
CorrectionHere is what's right.
Consider the following code:
If the equality operator
== compared objects looking at their values, it would conclude that
obj1 is equal to
obj2. But that is not what happens: the comparison is made between the two references contained in the two variables. As the two references refer to two distinct objects in memory, the comparison returns