Let's say you have
var funct=function(a,b){
return a+b;
};
console.log(funct);
Is there any way you can get the names of the arguments (a and b) from funct? If you are with in the function do you have any access to them? I know "arguments" gives you an array-like object, but is there anything that gives you a map-like or object-like representation of the arguments so that you can get their names when the function was declared?
argumentobject to implement variadic functions. If you want dynamic named arguments, use the options-hash pattern. (The one jQuery and other libraries use pervasively.)