A javascript library for working with objects
Calls a callback a specified number of times.
Param | Type | Description |
---|---|---|
times | number |
The number of times to call the callback. |
callback | function |
Provides one argument, a zero based index value of the call count. |
Example
import { repeat } from 'object-agent';
repeat(5, (index) => console.log(index));
// => 0
// => 1
// => 2
// => 3
// => 4