Let us guess two objects with same property:
var x = {a : \'some\'},
y = {a: \'some\'};
output:
x == y;
and x
In this cases, the variables point to two separate objects, thus not equal.
var x = {a:'some'}, // one object with "a" = "some"
y = {a:'some'}; // another object with "a" = "some"
var p = [1,2,3], // one array with 1,2 and 3
q = [1,2,3]; // another array with 1,2 and 3
But in this case, they point to the same object, thus equal
var x = y = {a: 'some'};
//is like:
var x = {a:'some'}, // x points to an object
y = x; // y is given reference to whatever x is pointing at
var p = q = [1,2,3];
//is like:
var p = [1,2,3], // p points to an array
q = p; // q is given reference to whatever p is pointing at