Learn Introductory JavaScript by Building a Pyramid Generator - Step 45

Tell us what’s happening:

const activity = character;
activity.repeat(i);
Hello. Something is wrong with my code. Will you be able to help me, please?

Your code so far

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


// User Editable Region

const activity = character;
activity.repeat(i);

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 45

  • what is “character” doing here?!
  • you are to make use of “repeat()” on given “push” method

i would say to restart and simply try again with aforementioned point in mind

happy coding :slight_smile:

1 Like

Thanks. You’ve really helped me.

1 Like