Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

Tell us what’s happening:

i dont know what is missing here.i stuck here from last 2 days

Your code so far

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

function padRow(name) {
  return name;
}

// User Editable Region

function addTwoNumbers(sum) {
  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/127.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

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

But ur code :

function addTwoNumbers(sum) { …}

function addTwoNumbers(5,10) {

return sum;

}

const sum = addTwoNumbers(5, 10);

console.log(sum);

is that what u r talking about?

The example code in the step55 is now showing how to use the argument passed in. You might want to do extra research like : https://www.youtube.com/watch?v=FOD408a0EzU

Hi there!

you need to add a function addTwoNumbers with 2 parameters. Currently you added numerical numbers, your parameters should be starts with alphabetical character.
Within the function body return the sum of that two parameters you add to the function.

1 Like