Last active
September 16, 2015 23:01
-
-
Save edysegura/cd8f8acbb3bd29b699c0 to your computer and use it in GitHub Desktop.
[JS] JavaScript Ninja Tricks
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
//convert a string to number | |
+'2' //2 | |
+'2a' //NaN | |
//convert anything to boolean | |
!!'it will be converted to true' //true | |
!!'' //false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment