Returns a new function which when applied to an argument, has the same effect as applying the specified function to the same argument n times.
the function to be repeated
the number of times to repeat the function
the new function that has the same effect as func repeated n times
const plusTen = repeat(x => x + 2, 5);plusTen(0); // Returns 10 Copy
const plusTen = repeat(x => x + 2, 5);plusTen(0); // Returns 10
Returns a new function which when applied to an argument, has the same effect as applying the specified function to the same argument n times.