One-Sided Ranges
Express open-ended ranges for slicing.
What Are One-Sided Ranges
A one-sided range omits one bound. It is most often used to slice a collection from or up to a position.
let letters = ["a", "b", "c", "d", "e"]
let tail = letters[2...]
print(Array(tail))From an Index Onward
arr[2...] means "from index 2 to the end". The starting index is included.
let nums = [10, 20, 30, 40]
print(Array(nums[1...]))