mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-22 03:26:02 -05:00
1.2 KiB
1.2 KiB
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 6610b8f6a98d25f4d485a94d | Step 10 | 1 | step-10 |
--description--
The default value of an uninitialized variable is undefined. This is a special data type that represents a value that does not have a definition yet.
You can still assign a value to an uninitialized variable. Here is an example:
let uninitialized;
uninitialized = "assigned";
Assign the string "Test" to your secondCharacter variable below your declaration. Open the console to see how your log has changed.
--hints--
You should not initialize secondCharacter. Remember that initialization means assigning a value when you declare the variable.
assert.notMatch(__helpers.removeJSComments(code), /let\s+secondCharacter\s*=/);
You should use the assignment operator on secondCharacter.
assert.match(__helpers.removeJSComments(code), /secondCharacter\s*=/);
You should assign the string "Test" to your secondCharacter variable.
assert.equal(secondCharacter, "Test");
--seed--
--seed-contents--
--fcc-editable-region--
let character = 'Hello';
console.log(character);
character = "World";
let secondCharacter;
console.log(secondCharacter);
--fcc-editable-region--