_.rangeRight([start=0], end, [step=1])
source npm package
This method is like _.range except that it populates values in descending order.
Since
4.0.0
Arguments
[start=0] (number): The start of the range.
end (number): The end of the range.
[step=1] (number): The value to increment or decrement by.
Returns
(Array): Returns the range of numbers.
Example
_.rangeRight(4);
// => [3, 2, 1, 0]
_.rangeRight(-4);
// => [-3, -2, -1, 0]
_.rangeRight(1, 5);
// => [4, 3, 2, 1]
_.range