-
Notifications
You must be signed in to change notification settings - Fork 5
range
Subhajit Sahu edited this page Mar 15, 2020
·
26 revisions
Returns evenly spaced values within given interval.
array.range(v, V, [stp]);
// v: start of interval
// V: end of interval (excluding)
// stp: spacing between values (1)
const array = require('extra-array');
array.range(0, 5);
// [0, 1, 2, 3, 4]
array.range(0, 5, 2);
// [0, 2, 4];
array.range(0, -5, -2);
// [0, -2, -4];