Learn Introductory JavaScript by Building a Pyramid Generator - Step 66

Tell us what’s happening:

i need the ans because i submit manny time different ans but I still face error.

Your code so far

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


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


// User Editable Region

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

// 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

You’re almost there. The instructions didn’t say to pass any arguments inside your function call of padRow so remove what’s inside the brackets.