Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

Tell us what’s happening:

Trying to solve this step 55:
function addTwoNumbers(5, 10) {
return sum;
}
const sum = addTwoNumbers(5, 10);
console.log(sum);
But nothing works.

Your code so far

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

function padRow(name) {
  return name;
}

// User Editable Region

function addTwoNumbers(5, 10) {
  return  sum;
}
const sum = addTwoNumbers(5, 10);
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 + "\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

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

please click the reset button and start this step again.

This time, to follow the instruction below you need to do something different:

Declare a function named addTwoNumbers . This function should take two arguments and return the sum of those two arguments.

When you create the function, make sure to define 2 parameters and give them a name.
They showed you an example:

function sayName(firstName, lastName) {
  return "John Doe";
}

Call them whatever you want.
Then inside the function, add the two parameters to each other as they wanted.

I am sorry, so where these two parameters are coming from? It feels like they ask for one thing, yet I need to do something else. Not entirely sure about these parameters at this point here.

Parameters come from the line of code that calls the function. Sometimes that will be a line of code that you cannot see.

You just have to write the code to accept two parameters and add them up using their names.