Learn Introductory JavaScript by Building a Pyramid Generator - Step 66

Tell us what’s happening:

please i dont know how to call my pad row function

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 66

Hello there!

This will help.

Sorry it didnt help i just what to know what to put in the rows.push()

you need to put a call to padRow, that’s why you have been given the link on how to call a function

please how do i call it

is the article on How to Call a Function in JavaScript not clear enough?

I cant recall and I amm stuck. can you help me

If that wasn’t clear, try this one instead: there is explained what is a function and how to call it, you don’t even need to read it all, just arrive to where it explains how to call a function

Please can you tell me what to type you references are way advanced from where i am. if you can write it it will be much appreciated :grin:

You need to call the function,

here you are calling push, only you have teh wrong argument. Calling a function means putting the () near the name and eventual arguments. You need to call padRow without arguments. You don’t need the function keyword for that

thank you so much maam :smiling_face_with_three_hearts:

please learn to use external resources, it’s essential

why maam

because your name looks female

Please do not ignore preferred pronouns