Learn Introductory JavaScript by Building a Pyramid Generator - Step 77

Tell us what’s happening:

I am on Step 77 of the building a pyramid generator section of learning javascript.

my code is:

while (continueLoop) {
  done ++;
}

I have also tried putting inside my while loop:

  done+=1;
and
  done = done + 1;

Nothing is working.
Why are these not passing the test?

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));
}*/

let continueLoop = false;
let done = 0;


// User Editable Region

while (continueLoop) {
  done ++;
}

// User Editable Region


let result = ""

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

console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 77

Hello!

If it is not passing with

I suggest checking if an extension may be the issue, try to reset, or reboot the browser. Or try submitting from another browser.

Hello!

I ran into the same issue, make sure to add the semicolon at the end of the loop.
The code below passed for me.

while (continueLoop) {
done++;
};
1 Like