Learn Introductory JavaScript by Building a Pyramid Generator - Step 11

Tell us what’s happening:

Greetings fellow coders! Can someone please help me with this step as I’'m stuck?

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);

Your browser information:

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 11

so this line of code here sets the value of the character variable to the string literal “World”.

And this step’s instructions were:

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

They also gave an example to explain what it means when a variable is assigned to another variable when they wrote:

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

Notice the 3rd line is not written:
second = "Two"; as that would be setting the variable second’s value to a string literal.
Rather the 3rd line of code allows us to assign whatever is in the first variable into the second variable.

Take another look at your code attempt. Did you make secondCharacter’s value the value of whatever character’s value may be at that moment?