Too Long; Didn't Read
Rust is strongly typed and defaults to immutable values. By default new variables are immutable, which means they can't be reassigned. In Rust, "let" declares immutable values, which contributes to Rust being a safer language. We will learn how immutable!= constant by using variable shadowing. In JavaScript, the let keyword is used to declare mutable values, but in Rust, it is allowed to declare a new variable with the same name, even all in the same scope. The name of the variable can easily point to an entirely new variable.
Share Your Thoughts