Variables, Again
Explore how Rust variables are used to assign clear, descriptive names to values, making your code more readable and easier to maintain. This lesson helps you understand the practical advantages of variables by comparing raw values with named variables, and guides you through exercises that emphasize expression usage without variables.
We'll cover the following...
We'll cover the following...
One common purpose for variables is to provide a convenient name to refer to values. For example, take this program:
We’ve used the numbers 2020 and 1985 twice each, and we have an expression 2020 - 1985 in ...