Skip to main content
Module

x/lodash_es/mod.ts>times

lodash for deno use
Latest
function times
import { times } from "https://deno.land/x/lodash_es@v0.0.2/mod.ts";

Invokes the iteratee n times, returning an array of the results of each invocation. The iteratee is invoked with one argument; (index).

Examples

_.times(3, String); // => ['0', '1', '2']

_.times(4, _.constant(0)); // => [0, 0, 0, 0]

Parameters

n

The number of times to invoke iteratee.

iteratee