.right(num)
Description
Returns a copy of the array containing only the last num elements (or fewer if the array is shorter).
Parameters
num — how many elements to keep from the end.
Usage
log [1,2,3,4].right(2) // [3,4]Last updated
Was this helpful?