Skip to content

fromRange

Subhajit Sahu edited this page May 19, 2020 · 13 revisions

Generates array from given number range. 🏃 📼 📦 🌔 📒

Alternatives: from, fromRange, fromApply.

array.fromRange(v, [V], [s]);
// v: start number
// V: end number, excluding (v)
// s: 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