Last active
April 26, 2016 23:14
-
-
Save MilanGrubnic70/cddd7c0698b9cce0ad08aa4731f343d2 to your computer and use it in GitHub Desktop.
Functions: Declarative vs. Expression
This file contains 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
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