70 %

Variables in Rust


On Rust variables.

Rust has one main way to declare variables. let. let is used for immutable variables and mutable variables.

rust
fn main() {
let n = 4;
Let mut x = 5;
}

Rust also has Constants