Created
January 24, 2018 12:00
-
-
Save jw-jenrise/f753a6a6403cbc536e027e29f6428a27 to your computer and use it in GitHub Desktop.
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
console.log("Begin example - 3"); | |
var p = 0; // Try replacing this with null, undefined, NaN | |
console.log("Value of p = " + p); | |
console.log("Boolean equivalent of p = " + Boolean(p)); // Truthy or Falsy value | |
// Example usage of truthy or falsy | |
if (p){ | |
console.log("I am happy"); | |
} else { | |
console.log("I am not sure"); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment