Question : swift 1 to n array
Answered by : mobile-star
Use the ... notation / operator:
let arr1 = 0...4
That gets you a Range, which you can easily turn into a "regular" Array:
let arr2 = Array(0...4)
Source : | Last Update : Wed, 08 Jun 22
Answered by : mobile-star
Use the ... notation / operator:
let arr1 = 0...4
That gets you a Range, which you can easily turn into a "regular" Array:
let arr2 = Array(0...4)
Source : | Last Update : Wed, 08 Jun 22