Learn Introductory JavaScript by Building a Pyramid Generator - Step 69 pls help

Tell us what’s happening:

im not sure but i think the wording is really throwing me off.

Your code so far


// User Editable Region

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

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

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

let result = ""

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

console.log(result);

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/133.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 69

You have the right idea but you should be modifying the existing line of code rather than replacing it. This was the original line of code:

return " " + character.repeat(rowNumber) + " ";

You should modify the two empty strings to apply the repeat method, as you did above, so you should end up with an empty string (repeated), a character (repeated) and then another empty string (repeated).