This method is like range except that it populates values in descending order.
range
The start of the range.
Optional
The end of the range.
The value to increment or decrement by.
Returns the range of numbers.
5.7.0
[[inRange]],[[range]]
rangeRight(4)// => [3, 2, 1, 0]rangeRight(-4)// => [-3, -2, -1, 0]rangeRight(1, 5)// => [4, 3, 2, 1]rangeRight(0, 20, 5)// => [15, 10, 5, 0]rangeRight(0, -4, -1)// => [-3, -2, -1, 0]rangeRight(1, 4, 0)// => [1, 1, 1]rangeRight(0)// => [] Copy
rangeRight(4)// => [3, 2, 1, 0]rangeRight(-4)// => [-3, -2, -1, 0]rangeRight(1, 5)// => [4, 3, 2, 1]rangeRight(0, 20, 5)// => [15, 10, 5, 0]rangeRight(0, -4, -1)// => [-3, -2, -1, 0]rangeRight(1, 4, 0)// => [1, 1, 1]rangeRight(0)// => []
This method is like
range
except that it populates values in descending order.