Learn Introductory JavaScript by Building a Pyramid Generator - Step 69

Tell us what’s happening:

I am not understanding to it how to solve it .Ihave try it lot of time but not doing work. Can you help me to solve this problem .

Your code so far

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


// User Editable Region

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

// User Editable Region


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

let result = ""

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

console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) 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 69

They want you to update this line to repeat the spaces on the left and the right of the character repeat statement.

You have modified the right space character and made it an empty string so please put back that space to begin with

Then add the .repeat call they wanted to each space.