I can not understand the cases

Tell us what’s happening:

Your code so far


// Declarations
var StUdLyCapVaR;
StUdLyCapVaR = 10;
//var properCamelCase;
//var TitleCaseOver;

//Assignments
//STUDLYCAPVAR = 10;
//PRoperCAmelCAse = "A String";
//tITLEcASEoVER = 9000;


var StUdLyCapVaR = 10;
var properCamelCase = "A String";
var TitleCaseOver = 9000;

Your browser information:

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

Challenge: Understanding Case Sensitivity in Variables

Link to the challenge:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/understanding-case-sensitivity-in-variables

i can’t understand the cases!

So the point of this lesson is to convert the declarations and assignments to their proper camel-case equivalent. Proper camel-case is simply to capitalize the first letter of each word, except the first word. So:

var THISIsntCamelCase; // the first word should be entirely lowercase.
var neiTHeRistHis; // random letters capitalized? Hard to read, non-intuitive.
var butThisOneIs; // The first word is lowercase, and by camel-case, the words become... words.
var andSoIsThis; // Again, the first word is lowercase, and each following starts with a capital.

/* So, given the following declarations: */
var StUdLyCapVaR;
var properCamelCase;
var TitleCaseOver;
/***
 *  Which do you think is "proper camel case"? And what do you need to 
 *    do to the other two to make them proper? Go ahead and change them.
 ***/

/* Now, on to the assignments: */
STUDLYCAPVAR = 10;
PRoperCAmelCAse = "A String";
tITLEcASEoVER = 9000;

/***
 *  Once you've changed the declarations above, the variable names need to match.
 *    Both the letters AND the case are important, so make sure to use the exact same!
 ***/
2 Likes