TA贡献1804条经验 获得超3个赞
上面获得的是ArraySlice 需要再用Array来包一层
let a = [1,2,3,4,5,6]
let b = a[0...1]
//b is type of ArraySlice
let b= Array(a[0...1])
//b is array
TA贡献1848条经验 获得超6个赞
let b = a[2...5]
//b = [3,4,5,6]
举报