There was an error while loading. Please reload this page.
Fill with given value.
Alternatives: fill, fill$.
function fill(x, v, i, I) // x: an array // v: value // i: begin index [0] // I: end index [|x|]
const xarray = require('extra-array'); var x = [1, 2, 3, 4]; xarray.fill(x, 2); // → [ 2, 2, 2, 2 ] xarray.fill(x, 2, 1); // → [ 1, 2, 2, 2 ] xarray.fill(x, 2, 1, 3); // → [ 1, 2, 2, 4 ]