@tempots/std

createFilledArray() function

Creates a new array with the specified length and fills it with the provided value.

Signature:

createFilledArray: (length: number, value: A) => A[]

Parameters

Parameter

Type

Description

length

number

The length of the new array.

value

A

The value to fill the array with.

Returns: A[]

A new array filled with the specified value.