Module

x/lodash_es/src/array.js>fill

lodash for deno use
Latest
function fill
import { fill } from "https://dotland.deno.dev/x/lodash_es@v0.0.2/src/array.js";

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

Note: This method mutates array.

Examples

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]

Parameters

array

The array to fill.

value

The value to fill array with.

start
end