Learn Introductory JavaScript by Building a Pyramid Generator - Step 3

Tell us what’s happening:

My code is
let ‘Character’=‘Hello’
but it isn’t correct.

Your code so far

Step 3

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. My problem is: Sorry, your code does not pass. Don’t give up.

You should still declare a character variable. // running tests You should still declare a character variable. Your character variable should still have the string "Hello" for its value. // tests completed


// User Editable Region

let 'Character'='Hello'

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/124.0.0.0 Safari/537.36 OPR/110.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 3

You cannot put quotes around a variable. That makes it a string.

Change your "Hello" string to use single quotes.

It’s just asking you to change the double quotes " into single quotes '

let ‘Character’=‘Hello’
I try : let Character=‘Hello’, but it is also a mistake in step three.

Reset the step and watch your capitalization. Have you noticed if variables are usually lower case or Capital Case?

Thank you. I’ve solved the problem. I did everything: 1,2,3,4,5. Now I am on to the sixth. I only have real problems with the sixth step. Can you open the theme belonged to the sixth step? I memorized all five previous steps. I know them all by heart and remember everything from them.

1 Like

create a new topic asking for help for step 6, use the Ask for help button

OK. I’ll do it as soon as possible.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.