Created
April 21, 2011 17:13
-
-
Save phiggins42/935015 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
// not sure I like: | |
!function(a, b){ /* ... */ }(1, 2); | |
// over: | |
(function(a, b){ /* ... */ })(1, 2); |
i see it as trading readability for a single byte saving. The ! to me means "not", at least in js. The latter example reads to me: "this wrapped function" then "execute with these args passed".
seeing
... }(1, 2)
hurts my brain.
agreed.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
never seen the first one. based on general knowledge, i'd say the second is best. The bash symbol reminds me of ruby's function implication meaning you're going to be altering the object in question immediately, so I suppose it's appropriate here (firing immediately).