says i need a function called addTwoNumbers which returns the sum of the 2 numbers. ive tried console.log to get the sum, returning the sum, changing the variable names. Nothing seems to work and i dont understand whats wrong.
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
return name;
}
// User Editable Region
function addTwoNumbers(Num1 , Num2) {
sum = Num1 + Num2;
return sum
}
let Num1 = 5;
sum Num2 = 10;
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 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 55
function padRow(name) {
return name;
}
function addTwoNumbers(num1 , num2) {
let sum = num1 + num2;
return sum
}
addTwoNumbers(5, 10);
console.log(sum);