Swift 1 To N Array

[Solved] Swift 1 To N Array | Fortran - Code Explorer | yomemimo.com
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

Answers related to swift 1 to n array

Code Explorer Popular Question For Fortran