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

**URL:** <https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-69/698329>\
**Category:** General\
**Tags:** español\
**Created:** [July 1, 2024, 2:47pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-69/698329 "2024-07-01T14:47:01Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![lucioskf](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/lucioskf/32/320298_2.png) [@lucioskf](https://forum.freecodecamp.org/u/lucioskf)\
**Post date:** [July 1, 2024, 2:47pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-69/698329/1 "2024-07-01T14:47:01Z")

</div>

### Tell us what’s happening:

I’m having trouble solving this exercise, it keeps coming up “You should call .repeat() on your " " strings to repeat them rowCount - rowNumber times.”

### Your code so far

```javascript
const character = "#";
const count = 8;
const rows = [];

// User Editable Region

function padRow(rowNumber, rowCount) {
  return " " + character.repeat(rowNumber) + " ".repeat(2, 2);
}

// User Editable Region

for (let i = 0; i < count; i = i + 1) {
  rows.push(padRow(i + 1, count));
}

let result = ""

for (const row of rows) {
  result = result + "\n" + row;
}

console.log(result);

```

### Your browser information:

El agente de usuario es: `Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36`

### Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 69

> **[freeCodeCamp.org](https://www.freecodecamp.org/espanol/learn/javascript-algorithms-and-data-structures-v8/learn-introductory-javascript-by-building-a-pyramid-generator/step-69)**
>
> Aprende a programar, ¡GRATIS!

---

<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:** [July 1, 2024, 2:47pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-69/698329/2 "2024-07-01T14:47:36Z")

</div>

> [@lucioskf](#):
>
> `return " " + `

here you are not calling the `repeat` method

> [@lucioskf](#):
>
> ```auto
> + " ".repeat(2, 2);
> }
> 
> ```

here you need to use the correct argument

---

<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:49pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-69/698329/3 "2025-01-08T15:49:04Z")

</div>

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


