Refine docs and tests.

This commit is contained in:
Stephen Chung
2020-07-06 16:20:03 +08:00
parent 3e45d5d9a5
commit 46cdec1280
7 changed files with 10 additions and 10 deletions

View File

@@ -12,7 +12,7 @@ Like C, `continue` can be used to skip to the next iteration, by-passing all fol
let x = 10;
loop {
x = x - 1;
x -= 1;
if x > 5 { continue; } // skip to the next iteration

View File

@@ -12,7 +12,7 @@ Like C, `continue` can be used to skip to the next iteration, by-passing all fol
let x = 10;
while x > 0 {
x = x - 1;
x -= 1;
if x < 6 { continue; } // skip to the next iteration
print(x);
if x == 5 { break; } // break out of while loop