fill()

Fill an array with a given value.

This function is valid in v2.1.0 to v2.14.0. This function has been downloaded 41 times.

Parameters

{Array} arr
Array to fill.
{*} value
Value with which to fill arr.
{number=} opt_start Optional
Starting position within arr at which to fill arr. If it is negative it will be calculated from the end of arr.
{number=} opt_end Optional, Default:arr.length
Ending position within arr at which to no longer fill arr. If it is negative it will be calculated from the end of arr.

Returns

{Array}
A reference to arr.