immutablevariable
nounUK /ɪˈmjuːtəbl ˈveəriəbl/
US /ɪˈmjuːtəbl ˈveriəbl/
A value in a computer program that you set once and cannot change later.
In the code, the immutable variable holds the user's birth date so it stays the same all the time.
RELATED WORDS
OTHER MEANINGS
2. A named storage location whose value is fixed at creation and cannot be reassigned.
Declaring the immutable variable with the keyword const prevents accidental changes.
3. A programming concept used to make code safer by preventing unexpected modifications.
Using an immutable variable avoids bugs caused by changing values in different parts of the program.
4. A binding that may point to a mutable object but cannot be rebound to a new value.
The immutable variable always refers to the same list, though the list's contents can still change.