Learn Introductory JavaScript by Building a Pyramid Generator - Step 51

Tell us what’s happening:

Issue: Your padRow function should use the return keyword. Didn’t find solution working for me. I don’t understand the task. How am I supposed to figure this out? Time to give up.

Your code so far

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


// User Editable Region

function padRow() {
const hello = padRow("Hello");
return padRow();
}

// User Editable Region

const call = padRow();
console.log(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 + row + "\n";
}

console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/18.3.1 Safari/605.1.15

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 51

Is this what the instructions asked you to return?

When I use the function return to my string “Hello”, the issue remains the same.

What does that code look like?

And… what does the instructions say to return?

Nevermind I have found the mistake. It was typo issue