I'm running the following code:
function Status(type) {
this.type = type;
}
var race = new Status('race');
var status = race;
console.log(status);
console.log(race);
and the result is
[object Object]
Status {type: "race"}
Why are status and race giving different results? The '==' comparison returns true, whereas the '===' comparison returns false; how can I make status and race point to the same object?