Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

Tell us what’s happening:

iam confused and dont no how to proceed plese give a code to proceed

Your code so far

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

function padRow() {

}

// User Editable Region

const call = ();
function call() {
  return();
}



// User Editable Region



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

let result = ""

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

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

You’ve declared the call variable correctly, but you need to assign the variable to the padRow function call so that whatever padRow eventually returns is stored in the call variable. Make sense?

i had not under stand what u said

Okay. Do you understand how you would call the padRow function to run the code inside that function?

yes functin padRow (name){
}
is it right

It’s not a function call, it’s function declaration.

1 Like

Close. Except if you look at the padRow function definition, you’ll see that it takes no parameter, so the call to padRow would just be padRow(). Go back and review Steps 47 and especially 48. In Step 48, you’ll see the difference between creating the function definition and calling the function so it executes.

1 Like

i got it
--removed was the answer thanks

Please do not share solution code on the forum, thanks!