i am supoosed to add two numbers but i can’t get ti right
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
return name;
}
// User Editable Region
function addTwoNumbers(sum) {
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) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/125.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 54
Hi there. For this challenge, you need to create a function that accepts two arguments. Two variables. Inside the function body, you need to return the sum of the two variables.
Then below the function the function, you create a variable called sum. The sum variable is set equal to the return value of the addTwoNumbers with the numbers 5 and 10 provided as arguments. Afterwards, you need to log the value of sum to the console log.
the parameters of a function go between the round parenthesis, these are placeholder values that are assigned a value when the function is called, so they need to have names that are valid variable names