mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2025-12-23 03:53:24 -05:00
1.2 KiB
1.2 KiB
id, title, challengeType, dashedName
| id | title | challengeType | dashedName |
|---|---|---|---|
| 660ef0f7c4b8e68ccd1f0786 | Step 4 | 1 | step-4 |
--description--
JavaScript has seven primitive data types, with String being one of them. In JavaScript, a string represents a sequence of characters and can be enclosed in either single (') or double (") quotes.
Note that strings are immutable, which means once they are created, they cannot be changed. The variable can still be reassigned another value.
Change your "Hello" string to use single quotes.
--hints--
You should not have double quotes in your code.
assert.notMatch(__helpers.removeJSComments(code), /"/);
You should use single quotes for your "Hello" string.
assert.match(__helpers.removeJSComments(code), /'Hello'/);
You should still use let in your code.
assert.match(__helpers.removeJSComments(code), /let/);
You should still declare a character variable.
assert.match(__helpers.removeJSComments(code), /let\s+character/);
Your character variable should still have the string "Hello" for its value.
assert.equal(character, "Hello");
--seed--
--seed-contents--
--fcc-editable-region--
let character = "Hello";
--fcc-editable-region--