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

**URL:** <https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-89/718048>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [October 28, 2024, 5:59pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-89/718048 "2024-10-28T17:59:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![booleanmethod9](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/booleanmethod9/32/371980_2.png) [@booleanmethod9](https://forum.freecodecamp.org/u/booleanmethod9)\
**Post date:** [October 28, 2024, 5:59pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-89/718048/1 "2024-10-28T17:59:10Z")

</div>

### Tell us what’s happening:

What’s wrong with this code? …

### 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;

while (continueLoop) {
  done++;

// User Editable Region

  if (done === count) {
    let continueLoop = false;

  }

// 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/130.0.0.0 Safari/537.36`

### Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 89

> **[freeCodeCamp.org](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures-v8/learn-introductory-javascript-by-building-a-pyramid-generator/step-89)**
>
> 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:** [October 28, 2024, 6:34pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-89/718048/2 "2024-10-28T18:34:42Z")

</div>

Hi @booleanmethod9

The instructions ask you to assign a Boolean value to a variable.

 ![image](https://global.discourse-cdn.com/freecodecamp/original/4X/e/9/6/e96e7e6b3e60be35de0547771fb3043c35f7fb13.png)

In the editor the variable appears faded out, this is giving some information. A faded out variable means that the rest of the code doses not reference it.

In this instance, you are not asked to declare the variable. It was already declared above the function.

Happy coding

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/freecodecamp/original/3X/e/1/e1c433102e34b46dfaa3e15d13ab9a514b127078.svg) [@system](https://forum.freecodecamp.org/u/system)\
**Post date:** [April 29, 2025, 6:35am UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-89/718048/3 "2025-04-29T06:35:27Z")

</div>

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
