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