MYVAR
- это не то же самое, что MyVar
и myvar
. Возможно иметь несколько разных переменных с одним и тем же именем, но с другим корпусом. Настоятельно рекомендуется, чтобы для ясности вы не использовали эту функцию языка. var someVariable;
var anotherVariableName;
var thisVariableNameIsSoLong;
studlyCapVar
is defined and has a value of 10
testString: assert(typeof studlyCapVar !== 'undefined' && studlyCapVar === 10);
- text: properCamelCase
is defined and has a value of "A String"
testString: assert(typeof properCamelCase !== 'undefined' && properCamelCase === "A String");
- text: titleCaseOver
is defined and has a value of 9000
testString: assert(typeof titleCaseOver !== 'undefined' && titleCaseOver === 9000);
- text: studlyCapVar
should use camelCase in both declaration and assignment sections.
testString: assert(code.match(/studlyCapVar/g).length === 2);
- text: properCamelCase
should use camelCase in both declaration and assignment sections.
testString: assert(code.match(/properCamelCase/g).length === 2);
- text: titleCaseOver
should use camelCase in both declaration and assignment sections.
testString: assert(code.match(/titleCaseOver/g).length === 2);
```