Learn Introductory JavaScript by Building a Pyramid Generator - Step 28

Tell us what’s happening:

i assigned a method to my array variable and it isnt working

Your code so far

let character = 'Hello';
let count = 8;
let rows = ["Naomi", "Quincy", "CamperChan"];

// User Editable Region

rows.push("freeCodeCamp");
let pushed = rows
console.log(pushed);

// User Editable Region

let popped = rows.pop();
console.log(popped);
console.log(rows);

Your browser information:

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 28

Hi and welcome to the forum.

Please click the reset button to restore the code back to the state it was in at the beginning of the step.

After that, notice that your editor contains one line of code. You are being asked to modify this one line of code. You are meant to assign the result of the push into a variable. You should not add the variable on a different line.

It should be all on one line similar to what you see below for pop.

After that log the new variable as required.