# Learn Introductory JavaScript by Building a Pyramid Generator - Step 87

**URL:** <https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-87/705980>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [August 12, 2024, 7:43pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-87/705980 "2024-08-12T19:43:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![garza\_danielle93](https://avatars.discourse-cdn.com/v4/letter/g/dec6dc/32.png) [@garza\_danielle93](https://forum.freecodecamp.org/u/garza_danielle93)\
**Post date:** [August 12, 2024, 7:43pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-87/705980/1 "2024-08-12T19:43:37Z")

</div>

### Tell us what’s happening:

Please help me, I keep getting the erroer “your if statement should use the equality operator to compare done and count in the condition.”

### Your code so far

```javascript
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) {
  done++;
if (done == count);
}

// 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36`

### Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 87

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-introductory-javascript-by-building-a-pyramid-generator/step-87)**
>
> Learn to Code — For Free

---

<div class="post-metadata">

**Author:** ![Teller](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/teller/32/412338_2.png) [@Teller](https://forum.freecodecamp.org/u/Teller)\
**Post date:** [August 12, 2024, 7:46pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-87/705980/2 "2024-08-12T19:46:52Z")

</div>

Welcome to the forum @garza_danielle93

Please remove the semi colon at the end of the condition check, then add an opening curly brace.

> [@garza\_danielle93](#):
>
> ```auto
> if (done == count);
> }
> 
> ```

Happy coding

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 8, 2025, 3:40pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-87/705980/3 "2025-01-08T15:40:46Z")

</div>

Closed on January 8, 2025, 3:40pm UTC


