Skip to content

fromRange

Subhajit Sahu edited this page Dec 8, 2022 · 13 revisions

Generate array from given number range.

Alternatives: from, from$.
Similar: from, fromRange, fromInvocation, fromApplication.


function fromRange(v, V, dv)
// v:  start number
// V:  end number, excluding
// dv: step size [1]
const xarray = require('extra-array');

xarray.fromRange(0, 4);
// → [ 0, 1, 2, 3 ]

xarray.fromRange(0, 8, 2);
// → [ 0, 2, 4, 6 ]
Clone this wiki locally