pls describe the issue detail, i am stuck here pls
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
return name;
}
// User Editable Region
function addTwoNumbers(sum){
// User Editable Region
const sum=(5,10);
return sum;
}
console.log(sum);
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/126.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 55
We’re here to help, but let’s start with you telling us what you were hoping to do in this step.
For eg. you can start by describing what the addTwoNumbers function is supposed to do in your own words?
I believe the problem is that you did not understand what addTwoNumbers is supposed to do yet?
But I cannot be sure if you will not answer my question.
What do you think this function is supposed to do?
yes, that’s true.
The addTwoNumbers function is supposed to take two numbers (or arguments) and sum them. That means it should add them.
So do you know how to create a function called addTwoNumbers and make it expect 2 arguments?
(then make it add them and return the result of the addition?)
to return the sum, you just need to use the plus sign
the word sum is not supposed to be there
(the sum of something is the addition of two or more numbers)
so just change the return line to return the addition of a and b (don’t put the word sum there)