Learn Introductory JavaScript by Building a Pyramid Generator - Step 44

Hey! Can anyone help me pass this stage? Honestly, I don’t understand what they want me to do. :slight_smile:

Your code so far

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

function padRow(call) {


const call = "";

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

let result = ""

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


You are on the right track:

“…declare a call variable”

This you have done correctly.

“… assign your existing padRow call to that variable”

This needs work. How do you assign a value to a variable? If I asked you to assign 5 to the call variable, how would you do that? The instructions are asking you to do the same thing, but instead of assigning call a specific value, they are asking you to assign it the return value of calling the padRow function. When you call the function padRow in your code, it returns a value. So just like if you assigned 5 to the variable call, you can also assign the return value of padRow() to the variable call.

@bbsmooth Thank you so much, sir! It worked perfectly. You are an excellent teacher, and we are very grateful to have people like you in the community. Keep up the great work! Asante (that’s “thank you” in our language). :slight_smile:

1 Like