- let
- mut
Number in a mutable variable
- You can make them mutable by adding the mut keyword to the declaration
examples/variables/mutable-number/src/main.rs
fn main() { let mut num = 2; println!("{num}"); num = 3; println!("{num}"); }
2 3
fn main() { let mut num = 2; println!("{num}"); num = 3; println!("{num}"); }
2 3