fill
_.fill(start, end, value, array)
# Ⓢ [Ⓣ][1] Ⓝ
Fills elements of array with value from start up to, but not
including, end.
Since
3.2.0
Arguments
start(number): The start position.end(number): The end position.value(*): The value to fillarraywith.array(Array): The array to fill.
Returns
(Array): Returns array.
Example
var array = [1, 2, 3];
_.fill(0, array.length, 'a', array);
// => ['a', 'a', 'a']
_.fill(0, Array(3).length, 2, Array(3));
// => [2, 2, 2]
_.fill(1, 3, '*', [4, 6, 8, 10]);
// => [4, '*', '*', 10]