First exercise
Analyze and fix the following code:
fn main() { { let x = 5; } println!("x: {}", x); }
Hint
Look at the curly brackets and scoping of the variable x.
Analyze and fix the following code:
fn main() { { let x = 5; } println!("x: {}", x); }
Look at the curly brackets and scoping of the variable x.