Skip to content
Quiz · Variables and Types · lesson 2 of 12

Quiz — assigning twice

What happens when this program is built and run?

Rust
fn main() {
    let x = 5;
    x = 6;
    println!("{x}");
}