Learn Introductory JavaScript by Building a Pyramid Generator - Step 48

Tell us what’s happening:

my error keeps popping up as, You should assign call the result of your padRow call. What exactly am I doing wrong?

Your code so far

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

function padRow() {

}

// User Editable Region

padRow(call);
const call = padRow;

// User Editable Region



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

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/126.0.0.0 Safari/537.36 Edg/126.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 48

Instructions:
To see the result of calling your padRow function, declare a call variable and assign your existing padRow call to that variable.

Reset your challenge step and assign padRow() call to variable name call using const keyword.

Blockquote padRow(const call);

still don’t quite get it. I thought this was assigning “call” to the result of “padRow”?

Did you know, How to assign anything to a variable with declaration keyword?
@Anarchy

Was it covered in earlier lessons?

Here is the assignment of something’s within your previous challenges.

I am so lost. But I know what to do. I’ll start back at square one and take more notes. I wont give up.

After going back to step one this is what I came up with. I honestly dont understand exactly what I am doing wrong.

Blockquote

padRow(const call = padRow);

Blockquote

Am I assigning Call to the result of padRow? What should I move?

That is you added the assignment of padRow function reference to the call variable within the padRow() call.

You need to declare the call variable using const keyword, and assign the existing padRow() function call to it.
Remember you don’t need to add anything within the padRow function brace’s ().

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