there are so many way to do loop in swift 3,
let’s see.

for ... in style

1
2
3
for x in 0...2 {
// do something repeat
}