Basic bug I cant see so stuck

Tell us what’s happening:
Describe your issue in detail here.

So its day one for me and Im stuck on this section. its basically telling me that studlyCapVar and properCamelCode are not the same in both declarations and assignments. Ive stared at them for 30 minutes, re written them several times and Im just not seeing it. sorry for the dumb question but what am I doing wrong?

Your code so far

// Variable declarations
var studlyCapVar;
var studlyCapVar=10;
var properCamelCase;
var properCamelCase="A String";
var titleCaseOver;

// Variable assignments
properCamelCase="A String";
titleCaseOver = 9000;

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.99 Safari/537.36 Edg/97.0.1072.69

Challenge: Understanding Case Sensitivity in Variables

Link to the challenge:

Remove all assignments in the declarations area and you’re good.


Still getting …

studlyCapVar should use camelCase in both declaration and assignment sections.

properCamelCase should use camelCase in both declaration and assignment sections.

It looks like you added a second declaration for all of the variables (all the lines that start with var). Every variable can only be declared once.

1 Like

Its asking me to assign a value of 10 to studlyCapVar so dont I have to add…

var studlyCapVar=10;

This is declaring (creating) the variable without a value.

Using var declares (creates) the variable. You can’t do it twice for the same variable.

This is declaring (creating) and assigning (putting a value in) the variable at the same time.

This is assigning a value to an already declared variable.

Having both of these is not invalid syntax (like declaring twice is), but it doesn’t make sense because you are assigning the same value twice.

1 Like

Yes you are right of course, I removed the second lines of var and its completed. I find the instructions a bit complicated and I got the wrong end of the stick plus its my first day of learning.

Thank you for your help its greatly appreciated.

Thank you ,really appreciate the help

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.