In a JavaScript array, how do I get the last 5 elements, excluding the first element?
[1, 55, 77, 88] // ...would return [55, 77, 88]
adding additional examples:
[1, 55, 77, 88, 99, 22, 33, 44] // ...would return [88, 99, 22, 33, 44]
[1] // ...would return []
You can call:
If you don’t want to exclude the first element, use