Overview A variable is a symbolic name (identifier) that refers to a value stored in the computer’s memory. Unlike constants, the value held by a variable can be changed (mutated) during program execution. Core Concepts Declaration: Informing the compiler/interpreter that a variable exists (e.g., let x;). Initialization: Assigning an initial value to a variable (e.g.,…
Overview Immutability is the state of an object or value that cannot be modified after it is created. Instead of changing the existing data, any operation that would modify the value must create a new copy of the data with the changes applied. Core Concepts Mutable vs. Immutable: Mutable: The object can be changed in…
Overview A constant is an identifier for a value that cannot be modified during the execution of a program. Once a constant is assigned a value, that value remains fixed. Core Concepts Immutability: The core property of a constant; it prevents accidental changes to data that should remain static. Naming Conventions: Often written in SCREAMING_SNAKE_CASE…