Last active
September 3, 2020 11:24
-
-
Save alenvlahovljak/53a4a705ec19dec771cee07ef6db4d33 to your computer and use it in GitHub Desktop.
How to handle comparison corner cases?
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
var arr1 = []; | |
var arr2 = []; | |
//1. arr1 == !arr2 | |
//2. [] == false | |
//3. "" == false | |
//4. "" == 0 | |
//5. 0 == 0 | |
//6. 0 === 0 | |
if (true) console.log("Yes, it's true!"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment