You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So, we've cleared up all of the confusion around bindings, with one exception: why does Rust let us declare a variable binding without an initial value if we must initialize the binding before we use it? And how does it know that we have or have not initialized the binding? For that, we need to learn our next concept: if.
Unless I managed to completely miss it, those questions are never answered. I assume there were meant to be examples along the lines of
let y: int;
if x == 5i { y = 3 } else { y = 8 }
println!("{}", y);
and
let y: int;
if x == 5i { y = 3 }
println!("{}", y);
The text was updated successfully, but these errors were encountered:
The last paragraph of section 5 reads:
Unless I managed to completely miss it, those questions are never answered. I assume there were meant to be examples along the lines of
and
The text was updated successfully, but these errors were encountered: