-
Notifications
You must be signed in to change notification settings - Fork 5
range
Subhajit Sahu edited this page Mar 8, 2020
·
26 revisions
Return evenly spaced values within a given interval, like arange().
const arange = require('@extra-array/arange');
// arange(<start>, <stop>, [step=1], [target=[]], [at])
// -> <target>
arange(0, 3);
// [0, 1, 2]
arange(0, -4, -2);
// [0, -2]
arange(0, -4, -2, [10, 11]);
// [10, 11, 0, -2]
arange(0, -4, -2, [10, 11], 1);
// [10, 0, -2]
With extra-array try
Array.arange()
instead.