JavaScript Integer Range Utility
Take control of generating integer sequences in JavaScript!
Basic
Default: e.g Generate 1 to 10
ints({ from: 1, till: 10 });
Specify Spacing
ints({
from: 0, till: 15, stepsOf: 3
});
Increment Or Decrement!
ints({
from: 25, till: 1, stepsOf: 5
});
Simple
Even
ints({
from: 1, till: 20,
sequence: even({ stepsOf: 2 })
});
Odd
ints({
from: 1, till: 20,
sequence: odd({ stepsOf: 2 })
});
Prime
ints({
from: 1, till: 50,
sequence: prime({ stepsOf: 2 })
});
Multiples
ints({
from: 1, till: 35,
sequence: multiples({ of: 5, stepsOf: 2 })
});
Custom (Pluggable) Sequences
Sequence of leap years
ints({
from: 1980, till: 2020,
sequence: leapYear({ stepsOf: 2 })
});