i = 0 loop i < 10 { print("Loop" + i++) } loop { if i++ >= 20 break else if i == 15 continue print("Loop" + i) } # Loop with explicit continue and break in the body count = 10 loop { count = count - 1 if count == 3 { print("Ignition") continue } print(count) if count == 0 { print("Liftoff") break } } # Loop with condition count = 10 loop count >= 0 { print( if --count == 3 "Ignition" else if count < 0 "Liftoff" else count ) } #--- #Loop0 #Loop1 #Loop2 #Loop3 #Loop4 #Loop5 #Loop6 #Loop7 #Loop8 #Loop9 #Loop11 #Loop12 #Loop13 #Loop14 #Loop16 #Loop17 #Loop18 #Loop19 #Loop20 #9 #8 #7 #6 #5 #4 #Ignition #2 #1 #0 #Liftoff #9 #8 #7 #6 #5 #4 #Ignition #2 #1 #0 #Liftoff