Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

Tell us what’s happening:

hi guys i need some help here
function addTwoNumbers(num1, num2){
return addTwoNumbers;
};
addTwoNumbers(5,10);
const sum = 5 + 10;
console.log(sum)

Your code so far

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

function padRow(name) {
  return name;
}

// User Editable Region

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

its still asking me for this maybe i still need some more explanation about hard coded " // running tests Your function should return the sum of the two numbers. Your function should not return a hard-coded value. That is, it should work with any two number arguments. You should assign

sum

the value from calling the

addTwoNumbers

function with

5

and

10

for the arguments. // tests completed // console output"

This is an example of hardcoding. Delete this line.

You don’t need a semicolon after the function block }

I the new function, you should add the two numbers and return the result of the addition

but if i delete this line i don’t get the 15 and the nums that am adding

yes you should delete the line and correct the function.

Your function is not doing any addition.
Addition is what you do when you use the plus sign.

edit: you should delete at least the part that says 5 + 10
(you can keep the part that declares the sum but it should be assigned the result of the function call)

1 Like

thanks and awesome for a good solution

1 Like