Let vs Const
Multiple Choice Beginner
Question
Which keyword declares a variable that cannot be reassigned?
Hint
const creates an immutable binding.
Explanation
const declares a variable that cannot be reassigned. Attempting to reassign throws a TypeError. However, for objects and arrays, the contents can still be mutated — only the binding is immutable. Use const by default, let when reassignment is needed, and avoid var.
Related Resources
Related Lessons
- Variables
Learn JS variables.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.