Added note for bracket requirements on if statements (#20196)
This commit is contained in:
committed by
Manish Giri
parent
7997ff8f51
commit
d5ad4e0690
@ -70,6 +70,7 @@ if(number !=2)
|
|||||||
|
|
||||||
```
|
```
|
||||||
Note that the `else` and `else if` sections are not required, while `if` is mandatory.
|
Note that the `else` and `else if` sections are not required, while `if` is mandatory.
|
||||||
|
Also note that if the code following your conditional statement is a single line; you do not have to put the brackets around that code - but the brackets help for readability.
|
||||||
|
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
Reference in New Issue
Block a user