swift create array from range

Swift
let arr2 = Array(0...4)
Source

Also in Swift: