1.4 KiB
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 660ee6e3a242da6bd579de69 | Step 2 | 1 | step-2 |
--description--
One of the most important concepts in programming is variables. A variable points to a specific memory address that stores a value. Variables are given a name which can be used throughout your code to access that value.
Declaring a variable means giving it a name. In JavaScript, this is often done with the let keyword. For example, here is how you would declare a hello variable:
let hello;
Variable naming follows specific rules: names can include letters, numbers, dollar signs, and underscores, but cannot contain spaces and must not begin with a number.
Use the let keyword to declare a variable called character.
Note: It is common practice to end statements in JavaScript with a semicolon. ;
--hints--
You should use let in your code.
assert.match(__helpers.removeJSComments(code), /let/);
You should use character in your code.
assert.match(__helpers.removeJSComments(code), /character/);
You should use let to declare a character variable.
assert.match(__helpers.removeJSComments(code), /let\s+character/);
Your declaration should end with a semi-colon.
assert.match(__helpers.removeJSComments(code), /let\s+character;/);
--seed--
--seed-contents--
--fcc-editable-region--
--fcc-editable-region--