Learn Introductory JavaScript by Building a Pyramid Generator - Step 37

Tell us what’s happening:

Hi, I’m extremely new to coding, and I’m having trouble understanding what this step is asking me to do. Any help appreciated. Thanks!

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

for (const row of rows) {

}

// User Editable Region


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/124.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 37

Welcome to the forum @LinZ

In your for loop you used the concatenation operator to increase the value of the i variable by one.

This step wants you to use similar code to add row to result.

Happy coding

1 Like

Hi, thanks for your help! The way you worded it (“add row to result”) helped me understand what it was asking and I passed by using result = row + result.

*Edit: I was at first trying result = “result + row” which would fail the test.

I have a long way to go in my coding journey, but this community rocks and I’m happy to be a part of it!

1 Like

You will find many lessons hard to understand. These people are brilliant and sometimes take for granted the solitary learning curve for us regular folks. Don’t give up. I’m 17 months in and still can’t understand some of these lessons