hi guys is that mean that i have one statement with 3 elemet of iterator =count , condition,iteration ? that i should apply false for condition and iteration element?
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
let i=count;
for(false){condition,iteration;}
// 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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/123.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 99
hi there!
the instructions is:
Start by creating a new for loop. Declare your iterator i and assign it the value of count , then use the boolean false for your condition and iteration statements.
example: