# Вивчіть основи JavaScript, створивши генератор пірамід - Step 67

**URL:** <https://forum.freecodecamp.org/t/javascript-step-67/697042>\
**Category:** General\
**Tags:** українська\
**Created:** [June 24, 2024, 2:17am UTC](https://forum.freecodecamp.org/t/javascript-step-67/697042 "2024-06-24T02:17:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tata8888](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/tata8888/32/365476_2.png) [@Tata8888](https://forum.freecodecamp.org/u/Tata8888)\
**Post date:** [June 24, 2024, 2:17am UTC](https://forum.freecodecamp.org/t/javascript-step-67/697042/1 "2024-06-24T02:17:44Z")

</div>

### Розкажіть нам, що сталося:

You should now see the same bunch of characters in your console. Your padRow function is doing the exact same thing you were doing earlier, but now it’s in a reusable section of its own.

Use the addition operator to concatenate a single space " " to the beginning and end of your repeated character string.

Remember that you can use the + operator to concatenate strings like this:

🧐 Не получается:(

### Ваш код

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

// User Editable Region

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

// 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);

```

### Інформація про ваш браузер:

Агент користувача: `Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.0 Safari/605.1.15`

### Інформація про завдання:

Вивчіть основи JavaScript, створивши генератор пірамід - Step 67

> **[freeCodeCamp.org](https://www.freecodecamp.org/ukrainian/learn/javascript-algorithms-and-data-structures-v8/learn-introductory-javascript-by-building-a-pyramid-generator/step-67)**
>
> Навчіться кодувати БЕЗКОШТОВНО

---

<div class="post-metadata">

**Author:** ![pkdvalis](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/pkdvalis/32/350571_2.png) [@pkdvalis](https://forum.freecodecamp.org/u/pkdvalis)\
**Post date:** [June 24, 2024, 2:27am UTC](https://forum.freecodecamp.org/t/javascript-step-67/697042/2 "2024-06-24T02:27:12Z")

</div>

Hi, welcome to the forum 👋

```auto

" " //a single space
"" //an empty string

```

---

<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 7, 2025, 2:08pm UTC](https://forum.freecodecamp.org/t/javascript-step-67/697042/3 "2025-01-07T14:08:45Z")

</div>

Closed on January 7, 2025, 2:08pm UTC


