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.
`so this is what I wrote but still giving me an error. So not sure what am I doing wrong!! I also deleted all the wording on the top and spaces
What am I doing that is so wrong?`
Thanks in advance.
`// Assignments
var studlyCapVar = 10;
var properCamelCase = "A String";
var titleCaseOver = 9000;
and this is the results:
// running tests
studlyCapVar should use camelCase in both declaration and assignment sections.
properCamelCase should use camelCase in both declaration and assignment sections.
titleCaseOver should use camelCase in both declaration and assignment sections.
// tests completed`
```````````
See how the tests results say “in both declaration and assignment sections”? You don’t have separate declaration and assignment sections.
You should not have removed any lines of code, only edited the variable names.
Did you change the assignments at the bottom of the lesson as well as the declaration?
Also it looks like you may have reassigned the variables instead of changing both the declaration and assignment, leave all the code alone just change the names to use properCamelCase.
Ok, I reset the code and added the assignment underneath but still getting errors. It must be something very obvious that I"m not paying enough attention.
// Declarations
var StUdLyCapVaR;
var properCamelCase;
var TitleCaseOver;
// Assignments
STUDLYCAPVAR = 10;
PRoperCAmelCAse = "A String";
tITLEcASEoVER = 9000;
var studlyCapVar = 10;
var properCameCase = "A String";
var titleCaseOver = 9000;
I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.
See this post to find the backtick on your keyboard. The “preformatted text” tool in the editor (</>) will also add backticks around text.
var studlyCapVar = 10;
var properCameCase = “A String”;
var titleCaseOver = 9000;
You just need to change the variables they already gave you
// Declarations
var StUdLyCapVaR; //Just change these
var properCamelCase; //Just change these
var TitleCaseOver; //Just change these
// Assignments
STUDLYCAPVAR = 10; //Just change these
PRoperCAmelCAse = “A String”; //Just change these
tITLEcASEoVER = 9000; //Just change these
I had the same issue. With all of these challenges, I log out the final variable values to the console to check that they’re behaving as expected. Having the lines of console.log(); code caused the same error message you were getting, even though I had corrected the camelCase as instructed. As soon as I deleted the extra lines of code, all tests evaluated to true.