Back to Freecodecamp

Step 4

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

latest1.1 KB
Original Source

--description--

JavaScript has seven primitive data types, with String being one of them. In JavaScript, a <dfn>string</dfn> represents a sequence of characters and can be enclosed in either single (') or double (") quotes.

Note that strings are <dfn>immutable</dfn>, 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.

js
assert.notMatch(__helpers.removeJSComments(code), /"/);

You should use single quotes for your "Hello" string.

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

You should still use let in your code.

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

You should still declare a character variable.

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

Your character variable should still have the string "Hello" for its value.

js
assert.equal(character, "Hello");

--seed--

--seed-contents--

js
--fcc-editable-region--
let character = "Hello";
--fcc-editable-region--