Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

Tell us what’s happening:

Hello, i already looked at the solved problems but I still don’t understand how I should “You should assign call the result of your padRow call.” I really don’t know right now how should I assign it.
The forum also didn’t help me.

Your code so far

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

function padRow() {

}

// User Editable Region

padRow(call);
const call

// 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/125.0.0.0 Safari/537.36 OPR/111.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 49

combine these two lines and remove call from the paddRow function call.

Assignment is when you write <someVariable> = <something>;

I combined it like this now, but it doesnt seem right. What am i doing wrong? Why brain is not braining or something

padRow() = const call

Nevermind I got it.
Thank you!

no problem. Yeah always put the declaration of the variable on the left of the equal sign.

2 Likes