-
Notifications
You must be signed in to change notification settings - Fork 1
javascript function
Sébastien LUCAS edited this page Apr 9, 2014
·
4 revisions
//Function Declaration
function add(a,b) {return a + b};
//Function Expression
var add = function(a,b) {return a + b};
http://javascriptweblog.wordpress.com/2010/07/06/function-declarations-vs-function-expressions/
http://stackoverflow.com/questions/16439949/define-local-function-in-javascript-use-var-or-not
So use expression when possible