Created
May 15, 2020 09:23
-
-
Save FurkanKozen/bde11e104cfd89b72e69c8b25efbaa7a to your computer and use it in GitHub Desktop.
Null isn't greater than 0, isn't equal to 0, but is greater than or equal to 0 in JavaScript
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(null > 0); //'false' | |
console.log(null == 0); //'false' | |
console.log(null >= 0); //'true'! | |
//Explanation: | |
//https://blog.campvanilla.com/javascript-the-curious-case-of-null-0-7b131644e274 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment