The following is done in Firebug:
>>> [1, 2] == [1, 2]
false
>>> ({a : 1}) == ({a : 1})
false
I thought Javscript has some rule that says, if an Object or Array has the same references to the same elements, then they are equal?
But even if I say
>>> foo = {a : 1}
Object { a=1}
>>> [foo] == [foo]
false
>>> ({a: foo}) == ({a: foo})
false
Is there a way to make it so that it can do the element comparison and return true
?