Back to Freecodecamp

Step 8

curriculum/challenges/english/blocks/learn-introductory-javascript-by-building-a-pyramid-generator/6610b741b54b90f0c0fb3d58.md

latest1.1 KB
Original Source

--description--

When variable names are more than one word, there are specific naming conventions for how you capitalize the words. In JavaScript, the convention to use is <dfn>camel case</dfn>.

Camel case means that the first word in the name is entirely lowercase, but the following words are all title-cased. Here are some examples of camel case:

js
let variableOne;
let secondVariable;
let yetAnotherVariable;
let thisIsAnAbsurdlyLongName;

Use camel case to declare a new secondCharacter variable.

--hints--

You should declare a secondCharacter variable.

js
assert.match(__helpers.removeJSComments(code), /secondCharacter/);

You should use let to declare your secondCharacter variable.

js
assert.match(__helpers.removeJSComments(code), /let\s+secondCharacter/);

You should not assign a value to your secondCharacter variable. Do not forget your semicolon.

js
assert.match(__helpers.removeJSComments(code), /let\s+secondCharacter;/);

--seed--

--seed-contents--

js
--fcc-editable-region--
let character = 'Hello';
console.log(character);
character = "World";
console.log(character);

--fcc-editable-region--