Learning Introductory Javascript by Building a Pyramid Generator Step 28

I don’t know what I’m doing wrong here. I can’t figure out how to assign rows.push(“freeCodeCamp”) to a new “pushed” variable. Please see screenshot:

code to the problem:

let character = 'Hello';

let count = 8;

let rows = ["Naomi", "Quincy", "CamperChan"];

rows.push("freeCodeCamp");

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

console.log(pushed);

let popped = rows.pop();

console.log(popped);

console.log(rows);

link to problem:
https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-introductory-javascript-by-building-a-pyramid-generator/step-28

Please post your actual code and a link to the step. Thanks

I edited the post by adding the code snippet

You have created an extra call to .push()

How do I assign rows.push("freeCodeCamp") to my pushed variable, using let as my declaration?

Can you be more specific about how that is confusing? We aren’t allowed to write the answer for you.

Like I said, your problem is that you are using push twice

1 Like

I see what I did wrong and fixed it, thank you!