Explore Swift's looping constructs and learn how to iterate over collections, ranges, and more.

for number in 1...5 {
    print(number)
}

let fruits = ["Apple", "Banana", "Orange"]
for fruit in fruits {
    print(fruit)
}
Share this post