Step 66 - Having trouble with padRow function call in .push() - Need help

Hello everyone,

I'm working on the JavaScript Algorithm lesson, specifically Step 66 where we need to replace `character.repeat(i + 1)` with a `padRow` function call.

Here's my current code:
```javascript
const character = "#";
const count = 8;
const rows = [];

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

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

The code works correctly and produces the expected output:

Copy

#
##
###
####
#####
######
#######
########

However, I keep getting the error message: “You should call padRow in your .push() call.”

I’ve tried several variations:

  • rows.push(padRow(i + 1, count));
  • rows.push(padRow(i + 1,count))
  • rows.push(padRow((i + 1), count))

But none of them pass the test. What am I missing? Is there a specific format or syntax that the test is looking for?

Thank you for your help!

have you tried without arguments for padRow? without a link to the step I can’t check, but I think I remember that this step doesn’t require the arguments