We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Resize an array to given length!
function resize$(x, n, vd) // x: an array // n: new length // vd: default value
const xarray = require('extra-array'); var x = [1, 2, 3, 4, 5]; xarray.resize$(x, 3, 0); console.log(x); // → [ 1, 2, 3 ] var x = [1, 2, 3, 4, 5]; xarray.resize$(x, 7, 0); console.log(x); // → [ 1, 2, 3, 4, 5, 0, 0 ]
There was an error while loading. Please reload this page.