Learn Introductory JavaScript by Building a Pyramid Generator - Step 61

Tell us what’s happening:

I have been stuck on this part since yesterday and using google has not helped and i have tried everything but nothing seems to be working. Pls can I get some help?

Your code so far

const character = "#";
const count = 8;
const rows = [];

function padRow(rowNumber, rowCount) {
  return character.repeat(rowNumber);
}



// User Editable Region

for (let i = 0; i < count; i = i + 1) {
  rows.push (padRow);
}

// User Editable Region


let result = ""

for (const row of rows) {
  result = result + "\n" + row;
}

console.log(result);

Your browser information:

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 61

There shouldn’t be a space between the function name push and ()

I have removed the space

The instruction asked you to:

Replace the character.repeat(i + 1) in your .push() call with a function call for your padRow function.

Do you know what is missing here:

What you did here is just the function name. It’s not yet a function call.

Hint from the instruction:

A function is called by referencing the function’s name, and adding ().

I managed to sort that one out but now I am stuck on this bit Step 63

You should now see the same bunch of characters in your console. Your padRow function is doing the exact same thing you were doing earlier, but now it’s in a reusable section of its own.

Use the addition operator to concatenate a blank space " " to the beginning and end of your repeated character string.

Remember that you can use the + operator to concatenate strings like this:

" " + "string"

Please make a new help post for a new challenge step.