take-last
Version:
Returns a new shallow copy of the last n elements taken from the end of the given array. When list.length < n the list returned contain list.length elements.
2 lines (1 loc) • 12 B
Plain Text
Returns a new shallow copy of the last n elements taken from the end of the given array. When list.length < n the list returned contain list.length elements.