Learn Introductory JavaScript by Building a Pyramid Generator - Step 11

Tell us what’s happening:

ive done everything i could think of but i still dont know whats wrong

Your code so far

let character = 'Hello';
console.log(character);
character = "World";

// User Editable Region

let secondCharacter
let character = "Test";

// User Editable Region

console.log(secondCharacter);

Your browser information:

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 11

Before, the string ‘test’ had been assigned to the secondCharacter variable. In your code, you assigned the string to the character variable. The instructions do not require you to do that.

The instructions want you to reasign the secondCharacter to the variable character

so it would be

let character= secondCharacter?

Yes, that’s the way assigning character variable to secondCharacter. But you need remove let keyword and to add a space before = sign and remove the ?, instead place a semicolon.

Note: let keyword should only used once per variable.

i think i did that but i still keep getting you should not assign the value "Test" to your secondCharacter variable.

secondCharacter = "test";
character; = "secondCharacter";

you can’t put the semicolon before the assignment operator, and to the right pf the assignment operator you have a string, it should be a variable

i made the changes and i got You should assign the value of the character variable to your secondCharacter variable. Don’t forget your semicolon.

secondCharacter = 'World';
character = 'secondCharacter';

this is a string, it should be a variable

changed from a string to a variable still have the same problem

secondCharacter = 'World';
character = "secondCharacter";

that is still a string

do you know how to distinguish between a variabnle and a string?

i think its just different qoutes isnt it

strings have the quotes, and the quotes can be both '' or ""
variables don’t have quotes, they hold/point to a value

'secondCharacter' or "secondCharacter" are both strings, and they are equal to each other

ow that makes sense so it would be

character  = secondCharacter

yes, that is assigning the value of the secondCharacter variable to the character variable