Learn Introductory JavaScript by Building a Pyramid Generator - Step 27

Tell us what’s happening:

So I really don’t know what this is asking me. I have looked through previous forum posts and still cant figure it out. I am a super newb with javascript, can someone tell me whats wrong with this and maybe break it down in a way that ill understand? The only hint I have come accross is the code should only be one line, but I dont understand how that is possible.

Your code so far

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

// User Editable Region

let rows = ["Naomi", "Quincy", "CamperChan"];
rows.push("freeCodeCamp");
let popped = rows;
rows.pop("popped");

console.log(rows);

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 27

Welcome to the forum!
A few things to help you find the solution:

  • Look closely at what you are supposed to assign to the popped variable
    Note: Opposed to push(), .pop() doesn’t need an argument. .pop() will always target the last element.

  • Also what you are supposed to console.log? It’s in the description.
    Note: Use quotes for strings only, not for variables.

Hi, i think you misunderstood the instructions given to you. plase read carefully about the variable you should be creating.

variable “popped” must contain something that already stated on the instruction, and you must log the “popped” variable to the console, not something else.