Learn Introductory JavaScript by Building a Pyramid Generator - Step 37

Tell us what’s happening:

I cannot figure this out to save my life! I think I’m just putting my concatenation in the wrong place.

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) {
row = row + " result";
}

// User Editable Region


console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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

The wording is implying something incorrectly. The result variable needs to be set equal to result plus and the value of the row variable. Hope this helps.

2 Likes

I copied this and put it in my code and passed! Thanks!