Merge pull request #305 from mlamby/patch-2
Add break statement to cheatsheet.md
This commit is contained in:
commit
6757b66f95
@ -313,6 +313,15 @@ while (some_condition()) { /* do something */ }
|
|||||||
for (x : [1,2,3]) { print(i); }
|
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
|
## Conditionals
|
||||||
|
|
||||||
```
|
```
|
||||||
|
Loading…
x
Reference in New Issue
Block a user