Implement a function functionLength(fn) that returns the number of parameters expected by a function.
The function should:
fn: A functionlength property)Example
function sum(a, b, c) { return a + b + c; } functionLength(sum); // 3 function greet(name) { return "Hello " + name; } functionLength(greet); // 1 function noParams() { return 42; } functionLength(noParams); // 0
JavaScript Function
No test results yet
Click "Run" to execute tests