for-in Loops with Ranges
Iterating with for-in using integer ranges and closed/half-open range operators.
Welcome
Loops let you repeat work without repeating code. The `for-in` loop is Swift's most versatile iteration tool, working with ranges, collections, and any sequence.
Closed Range: a...b
The closed range operator `...` includes both endpoints:
```swift
for i in 1...5 {
print(i) // 1, 2, 3, 4, 5
}
```
This is the most common range used with `for-in`.