Learn Introductory JavaScript by Building a Pyramid Generator - Step 38

Tell us what’s happening:

Hi everyone.
Question : Replace your log statement with a statement to push i to your rows array.

To be honest I don’t understand what is incorrect in my code? Can you help me please :slight_smile:

Your code so far

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


// User Editable Region

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

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 38

Hello, you are missing the let part of your for loop, Happy coding!

Thanks a lot! It really helps me :slight_smile:

1 Like