Skip to content

Instantly share code, notes, and snippets.

@topicus
Created December 14, 2014 00:01
Show Gist options
  • Save topicus/7d263927b9fdc67f5a45 to your computer and use it in GitHub Desktop.
Save topicus/7d263927b9fdc67f5a45 to your computer and use it in GitHub Desktop.
Function Declarations vs Function Expressions
//function declaration
function hola(){
}
//function expresion
var hola = function(){
}
//named function expression
var hola = function hola(){
}
//function expression via group operator
(function(){});
//named function expression
(function hola(){});
//named function expression via operator prefixing
!function hola(){
}
//named function expression via operator prefixing
+function hola(){
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment