like lodash's takeRight, but also with offset.
simply does
array?.slice(array.length - n - offset , array.length - offset); Copy
array?.slice(array.length - n - offset , array.length - offset);
The array to query.
The number of elements to take.
The offset to apply for elements to take.
Returns the slice of array.
takeRight([0, 1, 2, 3]) //=> [3] takeRight([0, 1, 2, 3], 2) //=> [2, 3] takeRight([0, 1, 2, 3], 2, 1) //=> [1, 2] Copy
takeRight([0, 1, 2, 3]) //=> [3] takeRight([0, 1, 2, 3], 2) //=> [2, 3] takeRight([0, 1, 2, 3], 2, 1) //=> [1, 2]
like lodash's takeRight, but also with offset.
simply does