How to use for loop with numeric ranges in Swift

1 Answer

0 votes
for index in 1...10 {
    print("\(index)", terminator: " ")
}





/*
run:
   
1 2 3 4 5 6 7 8 9 10 
  
*/

 



answered Feb 9, 2021 by avibootz
...