Created
May 26, 2013 00:39
-
-
Save jcblw/5651329 to your computer and use it in GitHub Desktop.
Tildes FTW
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
~function(){ | |
console.log("Works!") | |
}() |
?: you were talking about this (in general) at the meetup. Is there an advantage (or even a difference)? Yes, I agree it looks cool. But why do you prefer this over, say, (function( x ){ /* do something */ }( y ))
?
@bjoshuanoah much cooler, I assume so since tilde is just an operator
@customanything I'll probably will still use the latter due to its ability to be compressed without warnings.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
That looks a lot better than ! or +.
Is this compatible with ES3 as well? or just ES5?