Skip to content

Instantly share code, notes, and snippets.

@Saneyan
Created August 1, 2012 04:25
Show Gist options
  • Select an option

  • Save Saneyan/3223667 to your computer and use it in GitHub Desktop.

Select an option

Save Saneyan/3223667 to your computer and use it in GitHub Desktop.
Self invoking anonymous functions
// Using void
void function(){
console.log( 'hello' );
}();
// Using !
!function(){
console.log( 'yes' );
}();
// Using ()
(function(){
console.log( 'no' );
}();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment