Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

Tell us what’s happening:

please I am trying to create a new function but its not working :slightly_smiling_face:

Your code so far

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

function padRow(name) {
  return name;

// User Editable Region

}
function addTwoNumbers()

// 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

Hi there!

What do you not understand?

I am trying to create the function addTwoNumbers but its not showing properly

Example of creating a function:

function myFunc() {

}

Ask, if you have more queries.

thank you so much :wink: for the help

1 Like

I have a bit of a problem. it keeps telling me that 5+10 is a hard coded value but I dont know what to do

function addTwoNumbers(){return 5 + 10};

const sum = 5 + 10;

console.log(sum);
this is code so far

that function will always return 15, you need to have two parameters between () in the function definition, and return the sum of those two parameters