By anonymous we’re referring to functions that don’t have names. How can that happen? Well, when you define a function with a function declaration, your function will definitely have a name. But when you define a function using a function expression, you don’t have to give that function a name.
You’re probably saying, sure, that’s an interesting fact, maybe it’s possible, but so what? By using anonymous functions we can often make our code less verbose, more concise, more readable, more efficient, and even more maintainable.
- 11. Anonymous Functions, Scope and Closures: Serious functions
- Publisher: O'Reilly Media, Inc.
- Released: March 2014
What do we mean by "anonymous" functions and what good are they?