While Expressions/Loops
We'll cover the following...
Previously, we saw recursion. That allowed us to do something more than once. However, in Rust, recursion isn’t the preferred way to make that happen. Instead, Rust prefers something called iteration. Iteration is a more direct way to say, “Do this more than once,” than recursion.
Iteration all but requires the usage of mutation. So far, all of the variables we’ve looked at in Rust have been immutable. Once created, you can’t change them. With shadowing and function calls, the exact value for a given name at a specific point in your code may appear to be different. But ...