Invokes the iteratee n times, returning an array of the results of each invocation. The iteratee is invoked with one argument: (index).
n
The number of times to invoke iteratee.
iteratee
Optional
The function invoked per iteration.
Returns the array of results.
5.0.0
times(3, String)// => ['0', '1', '2'] times(4, () => 0)// => [0, 0, 0, 0] Copy
times(3, String)// => ['0', '1', '2'] times(4, () => 0)// => [0, 0, 0, 0]
Invokes the iteratee
n
times, returning an array of the results of each invocation. The iteratee is invoked with one argument: (index).