Learn Introductory JavaScript by Building a Pyramid Generator - Step 22

Tell us what’s happening:

I can’t understand to mistake. In the test the last variable is coming but the code is not passing.

Your code so far

let character = 'Hello';
let count = 8;

// User Editable Region

let rows = ["Naomi", "Quincy", "CamperChan"];
let poppedValue= rows.pop();

// 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/113.0.1774.35

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 22

1 Like

Hi there! You have to declare a popped variable, not a poppedValue, then log it:

The console.log(variable) is not working. It is saying log your popped variable. what is my popped variable?

It’s just an example. Like said in the instuctions,

log your popped variable.

I don’t know what my popped variable is. I tried freeCodeCamp and camperChan but it didn’t work.

You have it in this line, just fix the variable name

I did . still not working

So share your latest code

let rows = [“Naomi”, “Quincy”, “CamperChan”];

rows.push= (“freeCodeCamp”);

let popped = rows.pop();


No need to log “freeCodeCamp”

And no need for = here

let rows = [“Naomi”, “Quincy”, “CamperChan”];


let popped = rows.pop();


Here still doesn’t work.

Console.Log the popped variable


like that

Log the Variable name popped to the console.

It worked. Thank you

Your welcome. Happy Coding.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.