Learn Introductory JavaScript by Building a Pyramid Generator - Step 10

Tell us what’s happening:

I’ve only seen one thread on here regarding this issue and I still can’t seem to get this to work. I’ve changed the “Test” to World and I’m still not getting it right. Checked out another thread and the support said just to change the text and nothing else was said but still it’s not happening with me. Don’t know what I’m doing wrong? Been on this a while trying to figure it out.

Your code so far

let character = 'Hello';
character = "World";

// User Editable Region

let secondCharacter;
secondCharacter = World;

// 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/ Safari/537.36 Edg/

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 10

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

You set it to the World variable but that doesn’t exist

Not sure if I’m just not looking at it properly or I’m being stupid. But I thought with adding the console.log that means its active? which is active in the character = “World”;
I’ve tried adding the character = secondCharacter like it mentions in the example but I’m not understanding this part. Not sure why lol…

What you are trying to do here is assign a variable named World to the secondCharacter variable

secondCharacter = World;

But if you look at your code, you never created a variable called World

let character = 'Hello';
character = "World";

the only variable you have created so far is the variable called character

The goal of this step is to show you how you can assign variables to another variable

Here is the example code again

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

here is the line you need to pay attention to from that example

second = first;

that line of code assign the first variable to the second variable

Here is another example of assigning one variable to another for more complete understanding of the concept

let num1 = 8
let num2 = 24

// num1 is now assigned to num2
// num2 will now hold the value of 8
num2 = num1

For this step, your answer should be one line of code.
I would suggest resetting the lesson and updating this origianl line here

secondCharacter = "Test";

you need to assign the character variable to your secondCharacter

You can test it by adding this console statement

console.log("This is the secondCharacter: ", secondCharacter)

if done correctly, you should see this result in the console

This is the secondCharacter:  World

hope that helps

1 Like