Learn Introductory JavaScript by Building a Pyramid Generator - Step 101

Tell us what’s happening:

Pls help me out on level 101. The loop does not iteration

Your code so far

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

function padRow(rowNumber, rowCount) {
  return " ".repeat(rowCount - rowNumber) + character.repeat(2 * rowNumber - 1) + " ".repeat(rowCount - rowNumber);
}

// TODO: use a different type of loop
/*for (let i = 1; i <= count; i++) {
  rows.push(padRow(i, count));
}*/

/*while (rows.length < count) {
  rows.push(padRow(rows.length + 1, count));
}*/


// User Editable Region

for (let i = count; i > 0; l--) {

}

// User Editable Region


let result = ""

for (const row of rows) {
  result = result + row + "\n";
}

console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 101

you do not have an l variable so you can’t write l--, consider what variables you have instead

Reread the instructions. Use a similar expression to that given in the challenge. Update your iteration statement to change the result by using a different operator (instead of a plus operator, you should use a minus operator).

Tell us what’s happening:

help me out on the tragedy issue i had. help me out to solve this variable problem

Your code so far

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

function padRow(rowNumber, rowCount) {
  return " ".repeat(rowCount - rowNumber) + character.repeat(2 * rowNumber - 1) + " ".repeat(rowCount - rowNumber);
}

// TODO: use a different type of loop
/*for (let i = 1; i <= count; i++) {
  rows.push(padRow(i, count));
}*/

/*while (rows.length < count) {
  rows.push(padRow(rows.length + 1, count));
}*/


// User Editable Region

for (let i = count; i > 0; false) {
  rows.push(padRow(i, count));
}


// User Editable Region


let result = ""

for (const row of rows) {
  result = result + row + "\n";
}

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/131.0.0.0 Safari/537.36 Edg/131.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 101

im still not get it show me the screenshot how i can range it properly

you need only to update this
reset the step, and follow what the instructions say to do for the iteratiion statement

I have merged your two topics, please do not open multiple topics for the same step.

were little bit hard for me to pass, pls do your possible best to help me out

if you have more questions on the step, please ask them

just only that one i asked before

try to follow the suggestions you received and post your updated code in this topic