If you want to get a sub array of an array in Swift 4, you simply use a one-side or two-side range operator.
let myArray = ["A", "B", "C", "D", "E"] var subArray = myArray[1...3] // Result: subArray = ["B", "C", "D"] var subArray = myArray[3...] // one-side range operator // Result: subArray = ["D", "E"] var subArray = myArray[...2] // one-side range operator // Result: subArray = ["A", "B", "C"]