Last active
August 29, 2015 14:17
-
-
Save fakhrizaki/ecef0f29f695f88e4f18 to your computer and use it in GitHub Desktop.
Strict Comparison in JS (== vs ===)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0 == false // true | |
0 === false // false, because they are of a different type | |
1 == "1" // true, auto type coercion | |
1 === "1" // false, because they are of a different type | |
null == undefined // true | |
null === undefined // false | |
'0' == false // true | |
'0' === false // false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment