Skip to content

Instantly share code, notes, and snippets.

@Gonzalo2683
Last active September 19, 2017 20:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gonzalo2683/930cee84ec9b4967dbfa292684a70ec0 to your computer and use it in GitHub Desktop.
Save Gonzalo2683/930cee84ec9b4967dbfa292684a70ec0 to your computer and use it in GitHub Desktop.
Falsy Values (using !!)
The empty string ""
null
undefined
The number 0
The number NaN
The Boolean false
Truthy
The String "0", " ", "false"
var i = 1 + undefined; //NaN
var j = 1 + null; // 1
1 * undefined; // NaN
1 * null; // 0
!!undefined; // false
!!null; // false
"value:" + null; //string
"value:" + undefined; // string
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment