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

**URL:** <https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-42/715095>\
**Category:** Curriculum Help\
**Tags:** javascript\
**Created:** [October 6, 2024, 9:35pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-42/715095 "2024-10-06T21:35:54Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![pravEEN2598](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@pravEEN2598](https://forum.freecodecamp.org/u/pravEEN2598)\
**Post date:** [October 6, 2024, 9:35pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-42/715095/1 "2024-10-06T21:35:54Z")

</div>

### Tell us what’s happening:

I am stuck here badly don’t know how to assign pass already done what mod asked to do but now working help me out.

### Your code so far

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

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

let result =""

// User Editable Region

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

}

// User Editable Region

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

### Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 42

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

---

<div class="post-metadata">

**Author:** ![hbar1st](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/hbar1st/32/372649_2.png) [@hbar1st](https://forum.freecodecamp.org/u/hbar1st)\
**Post date:** [October 6, 2024, 9:48pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-42/715095/3 "2024-10-06T21:48:23Z")

</div>

Check the instructions again. Did they say to add the string row or the variable row?

---

<div class="post-metadata">

**Author:** ![pravEEN2598](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@pravEEN2598](https://forum.freecodecamp.org/u/pravEEN2598)\
**Post date:** [October 6, 2024, 9:52pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-42/715095/4 "2024-10-06T21:52:55Z")

</div>

result = result + “row”;  
i have done that and its showing conactenate result to row and assign value back to result variable

---

<div class="post-metadata">

**Author:** ![pravEEN2598](https://avatars.discourse-cdn.com/v4/letter/p/c6cbf5/32.png) [@pravEEN2598](https://forum.freecodecamp.org/u/pravEEN2598)\
**Post date:** [October 6, 2024, 9:54pm UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-42/715095/5 "2024-10-06T21:54:16Z")

</div>

oki i have done that thanks for pointing out my mistake its was so simple.

---

<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 7, 2025, 9:54am UTC](https://forum.freecodecamp.org/t/learn-introductory-javascript-by-building-a-pyramid-generator-step-42/715095/6 "2025-04-07T09:54:56Z")

</div>

Closed on April 7, 2025, 9:54am UTC

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