Fills items in an array with a specified value. Optionally, one can start and/or end from a specific index.
array
(Array): input arrayvalue
(*): value that fills the array[start=0]
(number): start index[end=array.length]
(number): end index
(Array): input array filled w/ the value
const result = arrays.fill([1, 2, 3, 4], 'a', 1, 2);
console.log(result)
> [1, 'a', 'a', 4]