Conversation
|
Personally I use JSON to pass all my arguments there (I do it to avoid changing function's signature when I decide to add/remove some of the arguments later). function foo(params, flags) {}
function MyClass(instanceParams, flags) {}...and about naming arguments inside these object literals. I know that this is not the best answer, but maybe it will help :) |
|
Hi @reqshark my apologies for the delayed response. I'm not sure if this is the right place to explain the arguments array that's automatically assigned to every function scope. I appreciate the details you're trying to add to clarify why naming a parameter It would probably be worthwhile to have a section dedicated to explaining the array-like 🍻 |
|
thanks @hshoff I appreciate that! Plus I totally agree, keeping it simple is always better than the risk of confusion. I almost always need to understand why the convention/pattern is a practice before I could roll with it and even hope to implement it in a meaningful way. |
more on why plus mad steeze like that on the example