Learn Introductory JavaScript by Building a Pyramid Generator - Step 41

Tell us what’s happening:

i don’t know how to pass this step, please help!!!

Your code so far

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


// User Editable Region

for (let i = 0; i < count; i = i + 1) {
  rows.push(character.repeat(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/125.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 41

Instead of pushing i to the array, push the value of your character variable.

why are you using the repeat function? just push character

rows.push(character.push(i));
not working

// running tests You should push your

character

variable. // tests completed // console output TypeError: character.push is not a function TypeError: character.push is not a function

you should have only character as argument of the push function

Yes, I finally figured it out. Thank you