Home > @ailer/pocket > fill
fill() function 
创建一个包含指定长度的数组,并使用指定的值填充该数组
Signature:
typescript
fill: <T>(length: number, value: T) => T[]Parameters 
Parameter  | Type  | Description  | 
|---|---|---|
length  | number  | 要创建的数组的长度  | 
value  | T  | 要填充到数组中的值  | 
T[]
填充后的数组