The second code block in a do while loop isn't optional
This commit is contained in:
parent
cc7a59bad0
commit
c62122b0e3
|
@ -246,10 +246,9 @@ optionally be followed by an `else block`.
|
||||||
A `do loop` begins with the `do` keyword, followed by a single `statement` or a
|
A `do loop` begins with the `do` keyword, followed by a single `statement` or a
|
||||||
list enclosed in curly braces (`{` and `}`) of `statements`. It is then followed
|
list enclosed in curly braces (`{` and `}`) of `statements`. It is then followed
|
||||||
with the `while` keyword, then by its condition, an `expression` enclosed in
|
with the `while` keyword, then by its condition, an `expression` enclosed in
|
||||||
parentheses (`(` and `)`). It may then optionally be followed by a single
|
parentheses (`(` and `)`). It is then followed by a single `statement` or
|
||||||
`statement` or another list enclosed in curly braces (`{` and `}`) of
|
another list enclosed in curly braces (`{` and `}`) of `statements`. Finally
|
||||||
`statements`. Finally the `do loop` may optionally be followed by an
|
the `do loop` may optionally be followed by an `else block`.
|
||||||
`else block`.
|
|
||||||
|
|
||||||
#### While Loop
|
#### While Loop
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue