slice(["Inception", "The Matrix", "Pulp Fiction", "Interstellar", "The Shawshank Redemption"], 1, 3)
-
In this example, the list features the top five movies (text value).
- The startIndex is 1, meaning extraction starts at the second movie (zero-based indexing).
- The endIndex is set to 3, so the returned items will include the movies from index 1 up to, but not including, index 3, which are The Matrix (index 1) and Pulp Fiction (index 2).