There was an error while loading. Please reload this page.
Fills with given value. 🏃 📼 📦 🌔 📒
Alternatives: fill, fill$.
array.fill$(x, v, [i], [I]); // x: an array (updated) // v: value // i: start index (0) // I: end index (X) // --> x
const array = require("extra-array"); var x = [1, 2, 3, 4]; array.fill$(x, 2); // [ 2, 2, 2, 2 ] x; // [ 2, 2, 2, 2 ] var x = [1, 2, 3, 4]; array.fill$(x, 2, 1); // [ 1, 2, 2, 2 ] var x = [1, 2, 3, 4]; array.fill$(x, 2, 1, 3); // [ 1, 2, 2, 4 ]