Learn Introductory JavaScript by Building a Pyramid Generator - Step 3

Tell us what’s happening:

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.

Change your “Hello” string to use single quotes.

Your code so far


// User Editable Region

let character = "Hello";

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:126.0) Gecko/20100101 Firefox/126.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 3

Hi @fate1

You should not have double quotes in your code.

For this step you are asked to swap the double quote marks for single quote marks.

Happy coding

can you please help me with this quote

Hi @fate1

Change the " to '

can you please tell me how?

Delete the " and replace it with a '

Tell us what’s happening:

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.

Change your “Hello” string to use single quotes.
how can I make my string immutable

Your code so far


// User Editable Region

let character = "Hello";
charecter='Hello';
"Hello";


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:127.0) Gecko/20100101 Firefox/127.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 3

change this line, do not add other lines of code

how can i change it?

what values or character should be change

you need to change the double quotes to single quotes

Ive done that but still didn’t work
this is what Ive typed :

let character = “Hello”;
character = ‘Hello’;
‘Hello’;
but it is not the solution!

the third line code is single quotes

oh ya tnx pal
the answer was like that:
let character = ‘Hello’;
character =‘Hello’;
‘Hello’;
no double quotes at all

The task is to replace the double quote surrounding the “Hello” to single quote ‘Hello’

You dont need to re declare or re assign the variable. Just remove the double quote and replace it with a single quote

You have done it here. Now just remove the other additional code you have written

thx a lot bro that helps a lot