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 new array of numbers.
_.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);// => []
_.rangeRight
This method is like
_.range
except that it populates values in descending order.