To perform an action a fixed number of times and don't care about the number of each iteration, specify an underscore _ in place of a constant:
//print * 5 times for _ in 1...5 {//w w w .jav a2s .co m print("*") //prints out **** }
The preceding code outputs the asterisk five times.