Skip to content

Instantly share code, notes, and snippets.

@jonnybojangles
Created December 10, 2013 17:09
Show Gist options
  • Save jonnybojangles/7894221 to your computer and use it in GitHub Desktop.
Save jonnybojangles/7894221 to your computer and use it in GitHub Desktop.
What are the key differences between these two self-invoking functions?
!function(a){console.log(a)}('Hello'); // Returns function statement Hello and true
// VS
(function(a){console.log(a)})('World'); // Returns function statement: World and undefined
@jonnybojangles
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment