Let Without Assignment
We'll cover the following...
We'll cover the following...
So far, we’ve immediately assigned values to variables with let. However, it’s valid in Rust to separate these steps out. For example:
I point this out now because it may be surprising that:
-
xis an immutable variable -
But we’re allowed to say
x = 5...