Question : swift loop site:stackoverflow.com
Answered by : worrisome-weevil-d6i2q21b3dt5
let (first, last, interval) = (0, 100, 1)
var n = 0
for _ in stride(from: first, to: last, by: interval) { n += 1
}
Source : https://stackoverflow.com/questions/37170203/swift-3-for-loop-with-increment | Last Update : Wed, 08 Jul 20