A constant is a type of variable whose value cannot be changed once it is initialized (e.g., using 'const' in JS or 'final' in Java).
Variables and Memory Allocation Basics
What is a constant?
The answer
More FAQs in Variables and Memory Allocation Basics
A variable is a named storage location in the computer's memory used to hold data that can be modified or accessed during program execution.
RAM (Random Access Memory) is the computer's short-term memory where it stores the variables and data for programs that are currently running.
In languages like C++, it will hold random 'garbage' data from memory. In Java, it will throw an error or default to zero. In Python, variables must be initialized to exist.
Still have questions?
Browse all our FAQs or reach out to our support team
Want to upskill yourself?
Your learning library
Small steps. Big possibilities.
Find your next course. Build something great.