Learn Introductory JavaScript by Building a Pyramid Generator - Step 10

Tell us what’s happening:

I cant figure it out. ive tried changing the script, removing the “” , changing the secondCharacter to world and character with and without the “” , as well as adding extra lines to make world a variable. ive been at this for over 3 hours and have finally decided to admit to defeat. ive seen plenty of posts on this and i dont understand it still. can someone explain it in a way that a baby could understand?

Your code so far

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

// User Editable Region

secondCharacter = "World";

// User Editable Region

console.log(secondCharacter);
let first = "One";
let second = "Two";
second = first;

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 Edg/124.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 10

This should be the last line in the code. You have code below this for some reason, so you should reset the step.

// User Editable Region

secondCharacter = "World";

// User Editable Region

change your secondCharacter assignment from "Test" to your character variable.

I see, you assigned the same string, “World” that you assigned to character. Look at the example again:

let first = "One";
let second = "Two";
second = first;

Don’t copy the example into your code though!

See the last line there, how the second variable = the name of the first variable?

second = first;

Do this for your Character and secondCharacter variables

First reset the step to clear it.

So far you have:

  • stored the string “World” in the variable character
  • stored the string “Test” in the variable secondCharacter

Now you want to assign what’s stored in character and copy it into secondCharacter. To assign something into a variable you use =. Whatever is on the right side of = is stored into the left side.

Thank you! that fixed it, but what had i done wrong to get to that point?