20,741
edits
Line 202: | Line 202: | ||
Note how the function's signature doesn't have any named parameters at all - instead, the function call sets up a hash that is added to the namespace during invocation. | Note how the function's signature doesn't have any named parameters at all - instead, the function call sets up a hash that is added to the namespace during invocation. | ||
You can use this behavior to implement generic constructors that support object-specific instantiation, but also to implement function overloading - based on different parameter names at the call sites. | |||
===Nested functions, implicit return === | ===Nested functions, implicit return === |