After using the prefix method on an Array I get what is called an ArraySlice. How can I transform this into an Array?
prefix
Array
ArraySlice
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)