Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

Tell us what’s happening:

keeps asking for addTwoNumbers function when its already there. Any tips for an idiot

Your code so far

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

function padRow(name) {
  return name;
}

// User Editable Region

function addTwoNumbers(num1, num2) {
return num1, num2
}
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 (Macintosh; Intel Mac OS X 10_15_7) 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

1 Like

Hi there!
You need to return the sum of both arguments within the function body.
Then you need to assign your function to the variable called sum.

Welcome, NoobToFood,
The name of the function actually tells you what to do to the two variables in the function.

Hope this helps!