Let’s make one more tweak. Watch this step carefully; it’s a doozy:
- 11. Anonymous Functions, Scope and Closures: Serious functions
- Publisher: O'Reilly Media, Inc.
- Released: March 2014
Again, in the code below, watch the difference between the invocation of the function and returning it. The invocation of the function requires parenthesis while returning a function is simple done through "return" keyword followed by the reference variable to the function.