Understanding Case Sensitivity in Variables
In JavaScript all variables and function names are case sensitive. This means that capitalization matters.
MYVAR
is not the same as MyVar
nor myvar
. It is possible to have multiple distinct variables with the same name but different casing. It is strongly recommended that for the sake of clarity, you do not use this language feature.
Best Practice
Write variable names in JavaScript in camelCase. In camelCase, multi-word variable names have the first word in lowercase and the first letter of each subsequent word is capitalized.
Examples:
var someVariable;
var anotherVariableName;
var thisVariableNameIsSoLong;
Modify the existing declarations and assignments so their names use camelCase.
Do not create any new variables.
Tests
- Waiting: 1.
studlyCapVar
should be defined and have a value of10
. - Waiting: 2.
properCamelCase
should be defined and have a value of the stringA String
. - Waiting: 3.
titleCaseOver
should be defined and have a value of9000
. - Waiting: 4.
studlyCapVar
should use camelCase in both declaration and assignment sections. - Waiting: 5.
properCamelCase
should use camelCase in both declaration and assignment sections. - Waiting: 6.
titleCaseOver
should use camelCase in both declaration and assignment sections.
/** * Your test output will go here */