We have a function:
function Foo (a,b,c) {
return a + b + c;
}
Need to get names of Foo arguments outside from the function. The result should be:
Array['a', 'b', 'c']
Foo.arguments
returns null
.
The only way I see is calling Foo.toString()
and then parsing the result.
Is there another more correct way to get the names?