I keep getting this error that my function should return the sum of the two numbers, which it does give me the output of 15. What am I doing wrong. I am having trouble grasping the concepts.
// running tests
Your function should return the sum of the two numbers.
// tests completed
// console output
15
CamperChan
#######
########
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
return name;
}
// User Editable Region
function addTwoNumbers() {
return 5 + 10;
}
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 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.5 Safari/605.1.15
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 55
instructions for this part:Declare a function named addTwoNumbers . This function should take two arguments and return the sum of those two arguments.
arguments for the function should be alphabetical.
So you mean something like this when you say alphabetical: (num1, num2).
If so, please explain. I am having some difficulty grasping the concepts. They kind of come in and fade. I hope that means I am in the right direction.