3 ms·
Nope: js> a = {} [object Object] js> b = {} [object Object] js> a == b false == only casts between certain primitive types, it doesn't
by tlrobinson 17y ago
Nope:
js> a = {}
[object Object]
js> b = {}
[object Object]
js> a == b
false
== only casts between certain primitive types, it doesn't do a deep comparison:
js> x = null
null
js> y = undefined
js> x == y
true
js> x === y
false
Also undefined comparisons are still true with ===:
js> var _
js> _ === undefined
true
But you're right, === should be the default choice, and only use == if you have a good reason.