Skip to content

Instantly share code, notes, and snippets.

@MilanGrubnic70
Last active April 26, 2016 23:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MilanGrubnic70/cddd7c0698b9cce0ad08aa4731f343d2 to your computer and use it in GitHub Desktop.
Save MilanGrubnic70/cddd7c0698b9cce0ad08aa4731f343d2 to your computer and use it in GitHub Desktop.
Functions: Declarative vs. Expression
Two Forms of Functions
// function declaration
function square(x) {
return x * x;
}
// function expression
var square = function(x) {
return x * x;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment