Learn Introductory JavaScript by Building a Pyramid Generator - Step 9

Tell us what’s happening:

The instruction said to put a second console.log , where do I put it?

Your code so far


// User Editable Region

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



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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 9

1 Like

click the Reset button to restore the original code in the editor which will look like this:

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

then add the new console.log statement after the last line

1 Like

I had a similar question and your answer fixed the issue and I have a follow-up question.

Following the steps, I added a console.log following character=World. When I went from step 8 to step 9 that console log was removed. I added it back in thinking it was an error, which, ironically, caused the error message. Why was the console.log after World removed when I advanced the steps? Is that intentional? Is there a limit to the number of console.logs I can have in code?

the code you find at the beginning of a new step is not the code you wrote in the previous step, each step is a separate thing that does not consider the previous steps, so you will not find the code you wrote

1 Like

Hi there!

Create your own topic to the challenge step using Help button.