diff --git a/cheatsheet.md b/cheatsheet.md index 3a22508..6bde03f 100644 --- a/cheatsheet.md +++ b/cheatsheet.md @@ -313,6 +313,15 @@ while (some_condition()) { /* do something */ } for (x : [1,2,3]) { print(i); } ``` +Each of the loop styles can be broken using the `break` statement. For example: + +``` +while (some_condition()) { + /* do something */ + if (another_condition()) { break; } +} +``` + ## Conditionals ```