Learn Introductory JavaScript by Building a Pyramid Generator - Step 41

Tell us what’s happening:

I don’t understand what I am meant to do here, please I need help.

Your code so far

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

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

let result = ""


// User Editable Region

const row;
for (const 1 of row) {

}

// User Editable Region


console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:105.0) Gecko/20100101 Firefox/105.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 41

they are trying to teach you how to create a new kind of for loop. They show you an example of it:

for (const value of iterable) {

}

Then they ask you to make one. Except the one they asked for uses ‘row’ instead of ‘value’ and ‘rows’ instead of ‘iterable’.

1 Like

Thank you very much, I thought I was to do some other complicated thing.

1 Like

take your time when reading. If you’re not understanding what you are seeing, then it is better to do more research before you attempt the question. (for eg. you could google “js for of loops”)

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.