let vs const Reassignment
Multiple Choice Beginner
Question
Which code snippet will NOT cause an error?
Hint
Only one keyword allows reassignment without redeclaration.
Explanation
let allows reassignment (x = 10) but not redeclaration in the same scope. const forbids both reassignment and redeclaration. So let x = 5; x = 10; is the only valid snippet.
Related Resources
Related Lessons
- Variables
Learn how variables work in programming.
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.