Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

Tell us what’s happening:

so its asking me to Declare a sum variable and assign it the value of calling your addTwoNumbers function with 5 and 10 as the arguments. Log the sum variable to the console. and i have no idea how to do that pls help

Your code so far

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

function padRow(name) {
  return name;
}

// User Editable Region

// this is where i need help
function addTwoNumbers(a, b) {
  
}

addTwoNumbers(10, 5);
const sum = 10 + 5;
consoloe.log(sum);
// abc

// 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/128.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

this function you have now, it needs some code in side of it.
The code inside should add the 2 variables a and b
then it should return the sum

i added let a = 10 and let b = 5 inside the function but its telling me that i should have a function

Did you add those variables to the function or to the global scale?

you should not need to do this.

Inside the function you need to add the two parameters you have declared.
Then return the sum.