--- id: 56533eb9ac21ba0edf2244ab title: Understanding Case Sensitivity in Variables challengeType: 1 videoUrl: '' localeTitle: 了解变量中的大小写敏感度 --- ## Description
在JavaScript中,所有变量和函数名称都区分大小写。这意味着资本化很重要。 MYVARMyVarmyvar 。可以有多个具有相同名称但不同外壳的不同变量。强烈建议您为清晰起见, 不要使用此语言功能。

最佳实践

camelCase中用 JavaScript编写变量名。在camelCase中 ,多字变量名称的第一个单词为小写,每个后续单词的首字母大写。 例子:
var someVariable;
var anotherVariableName;
var thisVariableNameIsSoLong;
## Instructions
修改现有的声明和赋值,使其名称使用camelCase
不要创建任何新变量。
## Tests
```yml tests: - text: studlyCapVar已定义且值为10 testString: 'assert(typeof studlyCapVar !== "undefined" && studlyCapVar === 10, "studlyCapVar is defined and has a value of 10");' - text: properCamelCase已定义且值为"A String" testString: 'assert(typeof properCamelCase !== "undefined" && properCamelCase === "A String", "properCamelCase is defined and has a value of "A String"");' - text: titleCaseOver已定义,其值为9000 testString: 'assert(typeof titleCaseOver !== "undefined" && titleCaseOver === 9000, "titleCaseOver is defined and has a value of 9000");' - text: studlyCapVar应该在声明和赋值部分使用camelCase。 testString: 'assert(code.match(/studlyCapVar/g).length === 2, "studlyCapVar should use camelCase in both declaration and assignment sections.");' - text: properCamelCase应该在声明和赋值部分使用camelCase。 testString: 'assert(code.match(/properCamelCase/g).length === 2, "properCamelCase should use camelCase in both declaration and assignment sections.");' - text: titleCaseOver应该在声明和赋值部分使用camelCase。 testString: 'assert(code.match(/titleCaseOver/g).length === 2, "titleCaseOver should use camelCase in both declaration and assignment sections.");' ```
## Challenge Seed
```js // Declarations var StUdLyCapVaR; var properCamelCase; var TitleCaseOver; // Assignments STUDLYCAPVAR = 10; PRoperCAmelCAse = "A String"; tITLEcASEoVER = 9000; ```
## Solution
```js // solution required ```