Swift has a nice syntax for grabbing subarrays: let array = [1, 2, 3, 4, 5, 6] let subarray = array[0...2] // Yields [1, 2, 3].
確定! 回上一頁