Understanding Case Sensitivity in Variables in javascript

Tell us what’s happening:

Your code so far

// Declarations
var StUdLyCapVaR=camelCase;
var properCamelCase=camelCase;
var TitleCaseOver=camelCase;
var camelCase;
// Assignments
PRoperCAmelCAse = "A String";
tITLEcASEoVER = 9000;

Your browser information:

Your Browser User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36.

Link to the challenge:

You should probably review the following challenges to understand the differences between declaring a variable and assigning a value to a variable.

Once you understand these concepts, then you need to understand that in both sections (Declarations and Assignments), the variable names have to be exactly the same. JavaScript is case-sensitive, so a variable named JAVASCRIPT would not be the same variable as JavaScript.

.I’ve edited your post for readability. When you enter a code block into the forum, precede it with a line of three backticks and follow it with a line of three backticks to make 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.



1 Like