fill

Array
since 3.2.0

Returns

Array `array`.

Fills elements of array with value from start up to, but not including, end.

Note: This method mutates array.

Example of Lodash _.fill

var array = [1, 2, 3];

_.fill(array, 'a');
console.log(array);
// => ['a', 'a', 'a']

_.fill(Array(3), 2);
// => [2, 2, 2]

_.fill([4, 6, 8, 10], '*', 1, 3);
// => [4, '*', '*', 10]