Created
June 13, 2011 04:46
-
-
Save mkuklis/1022325 to your computer and use it in GitHub Desktop.
falsy values in JavaScript
This file contains hidden or 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
6 falsy values in JS: | |
- false | |
- null | |
- undefined | |
- '' // empty string | |
- 0 // number 0 | |
- NaN | |
all other values are truthy (including "false") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment