You use ==
or ===
:
var thesame = obj1===obj2;
From the MDN :
If both operands are objects, then JavaScript compares internal
references which are equal when operands refer to the same object in
memory.
You use ==
or ===
:
var thesame = obj1===obj2;
From the MDN :
If both operands are objects, then JavaScript compares internal
references which are equal when operands refer to the same object in
memory.