_.times(n, [iteratee=_.identity])
Invokes the iteratee n times, returning an array of the results of each invocation. The iteratee is invoked with one argument; (index).
Arguments
n (number): The number of times to invoke iteratee.
[iteratee=_.identity] (Function): The function invoked per iteration.
Returns
(Array): Returns the array of results.
Example
Last updated on March 6, 2024