---
id: 660f4c3b01c44743719c99e4
title: Step 104
challengeType: 1
dashedName: step-104
---

# --description--

Because you are only subtracting one from `i`, you can use the <dfn>decrement operator</dfn> `--`.

Replace your subtraction assignment with the decrement operator.

# --hints--

Your `for` loop should not use subtraction assignment.

```js
assert.notMatch(__helpers.removeWhiteSpace(__helpers.removeJSComments(code)), /for\(leti=count;i>0;i-=1\)\{rows\.push\(padRow\(i,count\)\);/);
```

Your `for` loop should use the decrement operator.

```js
assert.match(__helpers.removeJSComments(code), /for\s*\(\s*let\s+i\s*=\s*count\s*;\s*i\s*>\s*0\s*;\s*i--\s*\)\s*\{\s*rows\.push\(\s*padRow\s*\(\s*i\s*,\s*count\s*\)\s*\);/);
```

# --seed--

## --seed-contents--

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

/*while (rows.length < count) {
  rows.push(padRow(rows.length + 1, count));
}*/

--fcc-editable-region--
for (let i = count; i > 0; i -= 1) {
  rows.push(padRow(i, count));
}
--fcc-editable-region--

let result = ""

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

console.log(result);
```
