Learn Introductory JavaScript by Building a Pyramid Generator - Step 86

Tell us what’s happening:

Please I have an issue. I need assistance..can you tell me what’s wrong here

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 ++) {
}

// 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 (Linux; Android 12; CPH2387) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/97.0.4692.98 Mobile Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 86

Hi,
you are asked to increment the variable called done inside your loop. Inside the loop means the place between your { }.
Good luck!

Ok.. that means I should just add the increment inside my loop

Yeah. the increment ( ++ ) alone doesnt mean anything. You have to increment a variable and the variable is given to you in the instructions

Yes thanks.. done .. I have gotten it

1 Like