Learn Introductory JavaScript by Building a Pyramid Generator - Step 28

Tell us what’s happening:

I just write the code as instructed but keeps saying there is an error

Your code so far

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

// User Editable Region

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

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 28

This is the original line of code that you were meant to modify. (The second copy you created is incorrect)
Please reset and retry.

1 Like

So how can I fix it, please help me clearly!

As mentioned in the step:

Assign your existing rows.push() to a new pushed variable, and log it.

I have shown you the existing rows.push that they are talking about in my previous comment.
So now it is up to you to follow this instruction or ask a follow up question if you don’t understand something that you’ve read.

1 Like

I don’t understand! :expressionless:

Say more about what you do not understand.

You’ve typed out ‘rows.push(“freeCodeCamp”);’ when you didn’t need to. Reset then type only whats instructed infront of the ‘rows.push(“freeCodeCamp”);’ that is already there

basically remove the “freecodecamp” and asign only the “rows.push()”

you forgot the semi colon by console.log
it’s supposed be console.log(pushed);

thx so much hoping I get the hang of this!