Andrea Giammarchi (2015-03-25T16:12:31.000Z)
d at domenic.me (2015-04-14T22:05:44.850Z)
I think the main concern was: > Currently I can't see a way of getting default parameters as an iterable object. and indeed `arguments` is not the magic variable you are looking for. However, you are inside your own defined function so either you don't specify defaults, or you iterate over `[a, b]` ? Interesting enough, there's no actually a way to understand the function signature, in terms of optionally accepted arguments. `arguments.length` is one and same is for `foo.length` so if we'd like to understand if anyone invoked the function passing or not all optional parameters, how could we proceed? Lets say `foo` would like to delegate its own arguments including defined defaults to another function ... how can we grab these at runtime? I think the answer is still a static `[a, b]` as list of arguments to apply, but I can see some lack of "reflection" capability ... or maybe Reflect would solve this?