aboutsummaryrefslogtreecommitdiff
path: root/doc/docs/de/doc/control-flow/continue.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/docs/de/doc/control-flow/continue.md')
-rw-r--r--doc/docs/de/doc/control-flow/continue.md41
1 files changed, 41 insertions, 0 deletions
diff --git a/doc/docs/de/doc/control-flow/continue.md b/doc/docs/de/doc/control-flow/continue.md
new file mode 100644
index 0000000..b000765
--- /dev/null
+++ b/doc/docs/de/doc/control-flow/continue.md
@@ -0,0 +1,41 @@
1# Continue
2
3A continue statement can be used to skip the current iteration in a loop.
4
5```yuescript
6i = 0
7while i < 10
8 i += 1
9 continue if i % 2 == 0
10 print i
11```
12<YueDisplay>
13
14```yue
15i = 0
16while i < 10
17 i += 1
18 continue if i % 2 == 0
19 print i
20```
21
22</YueDisplay>
23
24continue can also be used with loop expressions to prevent that iteration from accumulating into the result. This examples filters the array table into just even numbers:
25
26```yuescript
27my_numbers = [1, 2, 3, 4, 5, 6]
28odds = for x in *my_numbers
29 continue if x % 2 == 1
30 x
31```
32<YueDisplay>
33
34```yue
35my_numbers = [1, 2, 3, 4, 5, 6]
36odds = for x in *my_numbers
37 continue if x % 2 == 1
38 x
39```
40
41</YueDisplay>