curriculum/challenges/english/blocks/learn-introductory-javascript-by-building-a-pyramid-generator/6610bf6fa14d700beed1b109.md
The <dfn>equality</dfn> operator == is used to check if two values are equal. To compare two values, you'd use a statement like value == 8.
Below done++ inside your loop, add an if statement. The statement should check if done is equal to count using the equality operator.
You should use an if statement in your loop. It should be added after done++.
assert.match(__helpers.removeJSComments(code), /while\s*\(\s*continueLoop\s*\)\s*\{\s*done\+\+;\s*if/);
Your if statement should use the equality operator to compare done and count in the condition.
assert.match(__helpers.removeJSComments(code), /while\s*\(\s*continueLoop\s*\)\s*\{\s*done\+\+;\s*if\s*\(\s*(?:done\s*==\s*count|count\s*==\s*done)\s*\)\s*\{/);
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;
--fcc-editable-region--
while (continueLoop) {
done++;
}
--fcc-editable-region--
let result = ""
for (const row of rows) {
result = result + row + "\n";
}
console.log(result);