Update variables.md

different messages for inner and outer scopes
This commit is contained in:
Anton
2024-04-13 11:46:46 +10:00
committed by GitHub
parent b86072ef4b
commit 714c577aa1

View File

@ -38,9 +38,9 @@ fn main() {
let x: i32 = 10;
{
let y: i32 = 5;
println!("The value of x is {} and value of y is {}", x, y);
println!("Inner scope value of x is {} and value of y is {}", x, y);
}
println!("The value of x is {} and value of y is {}", x, y);
println!("Outer scope value of x is {} and value of y is {}", x, y);
}
```