ArraySlice in Array Swift [duplicate] ArraySlice in Array Swift [duplicate] ios ios

ArraySlice in Array Swift [duplicate]


Just initialize a new Array with the slice:

let arr1 = [0,1,2,3,4,5,6,7]let slice = arr1[2...5]let arr2 = Array(slice)


matomo