SwiftSyntax
For-In Loop
Code example
for i in 0..<10 {
}Loops over a range or collection.
In Swift, for-in loop: loops over a range or collection — for i in 0..<10 { }
for i in 0..<10 {
}for i in 0..<10 {
}Loops over a range or collection.
Use for i in 0..<10 { }.
Use this pattern: for i in 0..<10 { }
Yes. Use Copy code and adapt the example to your program.
No. The language syntax is the same across operating systems.