get array using range swift code example Example: swift create array from range let arr2 = Array(0...4)