Open shevv920 opened 4 years ago
times receives as arguments the function to execute n times and a number of iterations, and returns an array of the results. Very useful when creating dynamic test data.
times
const randomBool = () => Math.random() > 0.5; const result = times(randomBool, 5); // result: [true, false, false, true, false]
taken by @AlekseyGoremykin
times
receives as arguments the function to execute n times and a number of iterations, and returns an array of the results. Very useful when creating dynamic test data.