Anonymous functions in JavaScript

If you need recursion, then name a function, but if you don’t, un-naming a function is fine … in other words, anonymous functions will do just fine when you don’t need recursion

var add = function(a,b) {
 return a+b;
};

About dannyrosales

Becoming a software craftsman.
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a comment