Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

Tell us what’s happening:

Help me. I do not know how to solve this step.

Your code so far

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

function padRow(name) {
  return name;

// User Editable Region

}

function addTwoNumbers (a, b); {
  return sum;
}
let a = 5;
let b = 10;
let sum = addTwoNumbers();
const sum = addTwoNumbers (a + b);
console.log(sum);

// User Editable Region


const call = padRow("CamperChan");
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 YaBrowser/24.10.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

you need to use the parameters in the return, so that it works with any two numbers passed in

1 Like

Can you show me how?

I can’t write what you need to write exactly, no
But you need to return the sum of the two parameters, that means using in the return statement a, b, and the sum operator +