Hi there, I have a problem with not understanding the question and how to execute the answer. I have searched other peoples problems and the solutions given, but I can’t understand what I am supposed to do here. Can someone give an example of what the formula is supposed to be and tell me why?
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
return name;
}
// User Editable Region
function addTwoNumbers(5,10){
return 5+10;
}
// 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; rv:130.0) Gecko/20100101 Firefox/130.0
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 55
I have finally figured out the solution, but I still don’t understand the assignment it was giving me. " Declare a sum variable and assign it the value of calling your addTwoNumbers function with 5 and 10 as the arguments. Log the sum variable to the console." is a confusing statement to me, but I think i understand why now, it was missing an instruction at the beginning that (for me at least) needed to be there to resolve my confusion. If it had stated at the beginning to " Make a addTwoNumbers function without hard-coding." I think I might have understood it better.
the part of the instructions about creating the function says:
Declare a function named addTwoNumbers. This function should take two arguments and return the sum of those two arguments.
Your function should not use hard-coded values.
it looks like it says to not use hard-coded values