You've learned the rules for naming variables in JavaScript. Remember: no spaces, can't start with numbers, and case matters.
Engagement Message
Ready to test your naming skills?
Type
Multiple Choice
Practice Question
Which of these variable names follows proper JavaScript naming conventions?
A. first name
B. firstName
C. first-name
D. 1stName
Suggested Answers
- A
- B - Correct
- C
- D
Type
Sort Into Boxes
Practice Question
Sort these variable names into the correct boxes:
Labels
- First Box Label: Valid Names
- Second Box Label: Invalid Names
First Box Items
- gameLevel
- user_id
- myScore
- total$
Second Box Items
- 3rdPlace
- final grade
Type
Fill in The Blanks
Markdown With Blanks
Fill in the blanks to create a valid and descriptive variable name for storing a player's high score using camelCase:
