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