Learn Introductory JavaScript by Building a Pyramid Generator - Step 42

Tell us what’s happening:

i dont understand what i must to do in this task can you explain to me

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 + 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/128.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 42

Reset it back to how it was. The arithmetic should go inside the for of loop. Look carefully at the instruction. The addition operator is used to add the row value to the result value. Result is a global variable, with an empty string value. You are re-assigning that here. Remember how you learned to re-assign the let variable? After the = sign look carefully at the instruction, the sum should add rows and the existing result value together using their variable names.