For instance, we write
arr.slice(Math.max(arr.length - 5, 0));
arr.length - 5 and 0 to return the max number between the 2 numbers.
And then we call
slice to return an array with the
arr entries between the index returned by
max to the last element.