Created
November 13, 2018 12:39
-
-
Save codermarcos/68e97e71d919f0455c8ceaf6b54cec3d to your computer and use it in GitHub Desktop.
Tabela de comparação 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
// usando === | |
1 === 1 // true | |
+0 === -0 // true | |
'1' === 1 // false | |
false === 0 // false | |
NaN === NaN // false | |
null === undefined // false | |
// usando == | |
1 == 1 // true | |
+0 == -0 // true | |
'1' == 1 // true | |
false == 0 // true | |
NaN == NaN // false | |
null == undefined // true | |
// usando Object.is | |
Object.is( 1 , 1 ) // true | |
Object.is( +0 , -0 ) // false | |
Object.is( '1' , 1 ) // false | |
Object.is( false , 0 ) // false | |
Object.is( NaN , NaN ) // true | |
Object.is( null , undefined ) // true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment