repeat

MJS / AC Piece API / help / done
repeat(n, fn)

Run a function `n` times, passing in `i` on each iteration and returning an array of the results (like map).

Parameters

Name Type Required Description
n number yes Iteration count (floored).
fn function yes Callback receiving index i.

Returns

array

Examples

No explicit examples yet.

Open prompt to experiment live.

Runtime Notes

No additional runtime notes yet.

Details

No additional details yet.

Live Preview

Embedded AC preview