Skip to content

fromRange

Subhajit Sahu edited this page Nov 20, 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 array = require('extra-array');

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

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