slice(["Inception", "The Matrix", "Pulp Fiction", "Interstellar", "The Shawshank Redemption"], 2)
-
In this case, using the same list as in example 1, the startIndex is set to 2, meaning extraction begins at the third movie (zero-based indexing). Since the endIndex is not defined, the function will return items from the start index through to the last item in the list, which are Pulp Fiction (idx 2),Interstellar (idx 3),The Shawshank Redemption (idx 4)