Declare a let Variable
Fill in the Blank Beginner
Question
Fill in the blank to declare a variable `score` that can be reassigned, initialized to 0.
Code
___ score = 0;
score = score + 10;
Hint
Use the keyword for variables that can change.
Explanation
let is the correct keyword for a variable that will be reassigned. const would throw a TypeError on the second line. var also works but let is the modern preferred choice for mutable variables.
Related Resources
Related Lessons
- JavaScript Variables
Learn about let vs const.
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.