I am confused why the following does not evaluate to true. How do I compare whether two objects are the same?
var x = new Object();
var y = {};
x == y // false
function Person(name) {
this.name = name;
}
var p1 = new Person("Chris");
var p2 = new Person("Chris");
p1 == p2 // false