vault backup: 2025-05-14 16:08:22

This commit is contained in:
Dane Sabo 2025-05-14 16:08:22 -04:00
parent 3ee80994dc
commit baa7139462

View File

@ -166,3 +166,20 @@ I can use this multiple line comment */
```
# 3.5 Control Flow
## `if` Statements
If statements in Rust are expressions, that optionally have else and else if
statements.
```Rust
if number > 5 {
println!("Yay!")
} else if number < 4{
println!("Boo!")
} else {
println!("Just right!")
}
```
Conditions for if statements *must* return Boolean types.
## Repetition with Loops