- fill<T>(array: undefined | null | any[], value: T): T[]
Parameters
- array: undefined | null | any[]
- value: T
Returns T[]
Returns array.
- fill<T>(array: undefined | null | List<any>, value: T): List<T>
Parameters
- array: undefined | null | List<any>
- value: T
Returns List<T>
- fill<T, U>(
array: undefined | null | U[],
value: T,
start?: number,
end?: number,
): (T | U)[] Parameters
- array: undefined | null | U[]
- value: T
Optional
start: numberOptional
end: number
Returns (T | U)[]
- fill<T, U>(
array: undefined | null | List<U>,
value: T,
start?: number,
end?: number,
): List<T | U> Parameters
- array: undefined | null | List<U>
- value: T
Optional
start: numberOptional
end: number
Returns List<T | U>
Fills elements of array with value from start up to, but not including, end.
Note: This method mutates array.