Mutable variable
Appearance
In Computer programming, a mutable variable is a variable that can be changes later in the program. [1]
In rust defining a mutable variable would look like this {{{1}}}
. This assigns the variable 'x' to the value of 5. If you wanted to create a immutable variable which could not later be changed, in rust you would do this. {{{1}}}
this assigns the variable 'y' to be 25. In the first example, the programmer could later in the program, do {{{1}}}
, and the value of 'x' which was formerly 5 will now be 125.