API Reference

Returns an array with elements copied N times.

function repeatArray<T>(arr: T[], n: number): T[]

// Example:

repeatArray([1, 2, 3], 3) //=> [1, 2, 3, 1, 2, 3, 1, 2, 3]