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

**URL:** <https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [September 24, 2024, 2:42pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487 "2024-09-24T14:42:20Z")\
**Posts on this page:** 17\
**Page:** 1

<div class="post-metadata">

**Author:** ![Black16](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/black16/32/340673_2.png) [@Black16](https://forum.freecodecamp.org/u/Black16)\
**Post date:** [September 24, 2024, 2:42pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/1 "2024-09-24T14:42:20Z")

</div>

### Tell us what’s happening:

Your if statement should have the string “false” as the condition.

help

### 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));
}*/

// User Editable Region

if (false) {
  console.log("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/128.0.0.0 Safari/537.36`

### Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 80

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

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [September 24, 2024, 2:45pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/2 "2024-09-24T14:45:55Z")

</div>

Please **Tell us what’s happening** in your own words.

Learning to describe problems is hard, but it is an important part of learning how to code.

Also, the more you say, the more we can help!

---

<div class="post-metadata">

**Author:** ![baibhavmandal](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@baibhavmandal](https://forum.freecodecamp.org/u/baibhavmandal)\
**Post date:** [September 24, 2024, 2:54pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/3 "2024-09-24T14:54:34Z")

</div>

Hello, I have reviewed the problem you’re facing. You mentioned that the condition in your if statement should be “false”. Please note that “false” is a string, not the Boolean value false.

---

<div class="post-metadata">

**Author:** ![Black16](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/black16/32/340673_2.png) [@Black16](https://forum.freecodecamp.org/u/Black16)\
**Post date:** [September 24, 2024, 3:07pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/4 "2024-09-24T15:07:07Z")

</div>

so what do i do now?

---

<div class="post-metadata">

**Author:** ![baibhavmandal](https://avatars.discourse-cdn.com/v4/letter/b/cab0a1/32.png) [@baibhavmandal](https://forum.freecodecamp.org/u/baibhavmandal)\
**Post date:** [September 24, 2024, 3:11pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/5 "2024-09-24T15:11:06Z")

</div>

Use `"false"` (a string value) in your `if` statement condition, instead of `false` (a Boolean value).

---

<div class="post-metadata">

**Author:** ![Black16](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/black16/32/340673_2.png) [@Black16](https://forum.freecodecamp.org/u/Black16)\
**Post date:** [September 25, 2024, 2:35pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/6 "2024-09-25T14:35:28Z")

</div>

like this? `if (""false") { console.log("Condition is true"); }`

but it’s stii not working

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [September 25, 2024, 2:38pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/7 "2024-09-25T14:38:09Z")

</div>

You shouldn’t rewrite your code to only be on one line.

---

<div class="post-metadata">

**Author:** ![Black16](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/black16/32/340673_2.png) [@Black16](https://forum.freecodecamp.org/u/Black16)\
**Post date:** [September 25, 2024, 2:48pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/8 "2024-09-25T14:48:40Z")

</div>

it’s not on a line, it’s because i copied it.

---

<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:** [September 25, 2024, 2:57pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/9 "2024-09-25T14:57:52Z")

</div>

strings should have only one quote per side, yours start with two quotes, that’s wrong

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [September 25, 2024, 2:59pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/10 "2024-09-25T14:59:28Z")

</div>

> [@Black16](#):
>
> if ("“false”) { console.log(“Condition is true”); }

If this is exactly copied from what you wrote, then it is 1 line instead of the original 3

---

<div class="post-metadata">

**Author:** ![Black16](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/black16/32/340673_2.png) [@Black16](https://forum.freecodecamp.org/u/Black16)\
**Post date:** [September 26, 2024, 7:39am UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/11 "2024-09-26T07:39:32Z")

</div>

it’s three it’s because i copied and pasted it that it’s looking as if it’s on a line. `if ("false") { console.log("Condition is true"); }`

 ![ffc](https://global.discourse-cdn.com/freecodecamp/original/4X/5/e/f/5ef625bee24cbcdd50869f0b89895852dadc77d5.jpeg)

---

<div class="post-metadata">

**Author:** ![Black16](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/black16/32/340673_2.png) [@Black16](https://forum.freecodecamp.org/u/Black16)\
**Post date:** [September 26, 2024, 7:40am UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/12 "2024-09-26T07:40:04Z")

</div>

thanks a lot, it worked.

---

<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:** [September 26, 2024, 8:45am UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/13 "2024-09-26T08:45:16Z")

</div>

please post code properly…

When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (`</>`) to add backticks around text.

 ![Pre-formatted-text](https://global.discourse-cdn.com/freecodecamp/original/3X/1/b/1b18854f1059217f29370444396145cc3a0cd8ae.gif)

See [this post](https://forum.freecodecamp.org/t/forum-code-formatting/25574) to find the backtick on your keyboard.  
**Note:** Backticks (`) are not single quotes (').

---

<div class="post-metadata">

**Author:** ![JeremyLT](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/jeremylt/32/291894_2.png) [@JeremyLT](https://forum.freecodecamp.org/u/JeremyLT)\
**Post date:** [September 26, 2024, 12:35pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/14 "2024-09-26T12:35:03Z")

</div>

Copy and paste should not be able to delete characters

---

<div class="post-metadata">

**Author:** ![Black16](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/black16/32/340673_2.png) [@Black16](https://forum.freecodecamp.org/u/Black16)\
**Post date:** [September 26, 2024, 12:56pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/15 "2024-09-26T12:56:25Z")

</div>

I have no idea why it did not appear the way it was suppose to.

---

<div class="post-metadata">

**Author:** ![Fuduckin](https://avatars.discourse-cdn.com/v4/letter/f/6bbea6/32.png) [@Fuduckin](https://forum.freecodecamp.org/u/Fuduckin)\
**Post date:** [March 9, 2025, 7:19am UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/16 "2025-03-09T07:19:27Z")

</div>

Click reset, find condition location, read what they ask u to insert.  
Hint: only 1 word needs to be change check for proper punctuation

---

<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:** [March 9, 2025, 11:01am UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-80/712487/17 "2025-03-09T11:01:58Z")

</div>


