times
Util
since 0.1.0
Arguments
- number The number of times to invoke `iteratee`.
- Function The function invoked per iteration.
Returns
Array the array of results.
Invokes the iteratee n
times, returning an array of the results of
each invocation. The iteratee is invoked with one argument; (index).
Example of Lodash _.times
_.times(3, String);
// => ['0', '1', '2']
_.times(4, _.constant(0));
// => [0, 0, 0, 0]