Last active
May 15, 2018 10:13
-
-
Save behreajj/874a9bd1abb732a16d87b37cae1bb753 to your computer and use it in GitHub Desktop.
JavaScript Truthiness
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(Boolean(0.0)); /* false */ | |
console.log(Boolean(1.0)); /* true */ | |
console.log(Boolean(-0.25)); /* true */ | |
console.log(Boolean(0.25)); /* true */ | |
console.log(Boolean(1.25)); /* true */ | |
console.log(0.0 == false); /* true */ | |
console.log(1.0 == true); /* true */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment