Reputation: 531
console.log(null == undefined); // prints true
console.log(null === undefined); // prints false
The second statement is clear to me, no type conversion takes place and therefore false is printed. But what happens in the first statement, what is converted to what? Can someone help me understand?
Upvotes: 0
Views: 29
Reputation: 664346
No "conversion" is going on. They just compare equal, similar to the distinct values +0
and -0
.
Upvotes: 1