Tell us what’s happening:
It keeps telling me this is wrong
function addTwoNumbers(a, b) {
return a + b;
}
const sum = addTwoNumbers(5, 10);
console.log(sum);
but it keeps telling me its wrong. . 1. You should have a function called addTwoNumbers.
2. Your function addTwoNumbers should have two parameters.
3. Your function should return the sum of the two parameters.
4. Your function should not return a hard-coded value. That is, it should work with any two number arguments.
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
// User Editable Region
function addTwoNumbers(a, b) {
return a + b;
}
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 + row + "\n";
}
console.log(result);
Your browser information:
User Agent is: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:136.0) Gecko/20100101 Firefox/136.0
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 55