Closed KCreate closed 7 years ago
This just skips to the end of the main block of all loops.
The following should print all uneven numbers from 0 to 50
let i = 0 while i < 50 { if i % 2 == 0 { continue } print(i) i += 1 }
The same should work for until and loop statements.
until
loop
This just skips to the end of the main block of all loops.
The following should print all uneven numbers from 0 to 50
The same should work for
until
andloop
statements.