primitive_types1.rs (412B)
1 // Booleans (`bool`) 2 3 fn main() { 4 let is_morning = true; 5 if is_morning { 6 println!("Good morning!"); 7 } 8 9 // TODO: Define a boolean variable with the name `is_evening` before the `if` statement below. 10 // The value of the variable should be the negation (opposite) of `is_morning`. 11 // let … 12 let is_evening = false; 13 if is_evening { 14 println!("Good evening!"); 15 } 16 }