-
-
Save iwein/4292496 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
//make sure you understand what's happening here, you'll thank me some day | |
'foo' === 'bar' | |
false | |
'foo' === 'foo' | |
true | |
//watch out! | |
!'foo' === 'foo' | |
false | |
!'foo' === 'bar' | |
false | |
!('foo' === 'foo') | |
false | |
!('foo' === 'bar') | |
true | |
// avoid '==', let me show you why | |
'foo' == 'bar' | |
false | |
//watch out! | |
!'foo' == 'bar' | |
false | |
!'foo' == '' | |
true //coersion is a bitch, see? | |
!'foo' === '' | |
false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment