Learn Introductory JavaScript by Building a Pyramid Generator - Step 53

Tell us what’s happening:

it says your padRow function should return the value of name parameter, im not able to understand what to do even after many tries could someone say what i have to do
const character = “#”;
const count = 8;
const rows = ;

function padRow(name) {
return “Hello!”;
}
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 + “\n” + row;
}

console.log(result);

Your code so far


// User Editable Region

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

function padRow(name) {
  return "Hello!";
}
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 + "\n" + row;
}

console.log(result);

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/127.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 53

Hi there!

That’s the name parameter for your padRow function.

You need to return name parameter instead of string "Hello!. That’s it.

1 Like

Continuing the discussion from Learn Introductory JavaScript by Building a Pyramid Generator - Step 53:

oh im sorry i didnt get it could type down so i can copy that please

ohh i finally got it thanks