how do i test this javascript function
showing it working would be amazing!!!!
the function and instructions are as follows
function repeatf(f,n) { if(n<=0) {return="">=0)> var result= new Array(n); for(var i=0; i result[i]= f(); } return result;}
This function accepts a function of no arguments ( f ) and an integer number ( n ). The function must return a list that contains the results of n executions of f. If n is non-positive this function must return the empty list.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here