chore: Update documentation for the while loop with continue statement

This commit is contained in:
Harold Anderson 2024-07-28 08:06:17 -07:00
parent e8f09190d6
commit 0f6e849660

View File

@ -8,12 +8,16 @@
// while (condition) : (continue expression) { // while (condition) : (continue expression) {
// //
// if (other condition) continue; // if (other condition) continue;
// // more statements;
// } // }
// //
// The "continue expression" executes every time the loop restarts // The continue statement causes the rest of the statements in the block {} to be skipped
// whether the "continue" statement happens or not. // for this iteration of the loop.
// //
// Then, the "continue expression" is executed and then
// the condition is checked again. If the condition is true, the block executes again.
//
const std = @import("std"); const std = @import("std");
pub fn main() void { pub fn main() void {