I read over a doc on equality comparison at MDN, but I'm interested in how Javascript performs strict equality checking.
There's also this specification: http://ecma-international.org/ecma-262/5.1/#sec-11.9.6, though, I don't really understand how it applies to two objects. The last statement is the key I think:
Return true if x and y refer to the same object. Otherwise, return false.
But how does Javascript check if they refer to the same object?
For example, given an object Kitten
that has a name
property, I create two kitties initialized with their names:
var kittenA = new Kitten("kitty A");
var kittenB = new Kitten("kitty B");
What does Javascript use to determine that that the following statement
kittenA === kittenB
Will return false?