I am searching for a method to sift through an array and retrieve the last x number (or most recently added) of elements/indices from that array. While I understand that .pop() may be a possibility, I am uncertain about how to integrate pop with filter, or how to specifically return a given number of last elements/indices.