Learn Introductory JavaScript by Building a Pyramid Generator - Step 42

Tell us what’s happening:

I have solved this but the problem is I cannot fix it

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 (let row of rows) {

result = rows +" row";

}

console.log(result);

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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 42

The step says

concatenate the row value to the result value.

But in your code:

You concatenated rows (not row) to the string “row” not the variable result.

Please reset and retry

1 Like

I tried but, does not change at all

Hi,
your output in this step should be a string that looks like this: 01234567.
The only variables needed for this concatenation are result and row.
Hope this helps:)

1 Like

Ok thank you. I get it and solved it :heart:

1 Like

please don’t post your solutions on the forum. thanks.

1 Like

Sorry getting to excited

1 Like