Skip to main content

Module: util/array

Functions

repeat

repeat<T>(array, n): T[]

Creates a new array repeating the given array n times

Type parameters

Name
T

Parameters

NameTypeDescription
arrayT[]The array to repeat
nnumberThe number of times to repeat the array

Returns

T[]

The new array

Defined in

util/array.ts:9