For Loop in Swift

for loops in swift 3 or later

for value in range {
statements
}

// prints 1-10
for i in 1...10 {
    print(i)
}

// prints 0-9
for i in 0..<10 {
    print(i)
}
// this will print the numbers from 10 to 1
for i in (1...10).reversed() {
    print(i)    
}