Learn Introductory JavaScript by Building a Pyramid Generator - Step 11

Tell us what’s happening:

I can’t figure out why the code is not passing. Could you please help me understand what I’m not seeing? Thank you in advance!

Your code so far

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

// User Editable Region

secondCharacter = "character";
character = secondCharacter;

// User Editable Region

console.log(secondCharacter);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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

HI @pauldesigns

If you place quote marks around something, it becomes a string.

Happy coding

2 Likes

The value of your secondCharacter is incorrect. It says to assign the character variable. You use the name of the variable, character. You don’t put it in quotes, that would be assigning a string of text.

You were not asked to re-assign your character variable so remove your 2nd line of code.

2 Likes

That was helpful and effective. Thank you!

2 Likes

Thanks for the explanation!

1 Like