Learn Introductory JavaScript by Building a Pyramid Generator - Step 86

Tell us what’s happening:

please what is the matter in this code? step 86
while (continueLoop) {
if(done==count){
break;
}
done++;

}

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;

// User Editable Region

let done = 0;
while (continueLoop) {
  if(done==count){
    break;
  }
  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; Ubuntu; Linux x86_64; rv:127.0) Gecko/20100101 Firefox/127.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 86

You need to put the if statement after incrementing the done variable, so you can check its new value.

debes abrir y cerrar llaves en el if
mod edit: code removed

Welcome to the forum. Create your own topic to the challenge step by using help button that appears below the challenge editor, when you attempting wrong code more than three times.

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge.

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.