Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

Tell us what’s happening:

I have been at this for a while, I can’t seem to get it. I just don’t see where I’m going wrong, can someone elaborate on what sis wrong with what I have written?

Your code so far

const character = "#";
const count = 8;
const rows = [];

function padRow(name) {
  return name;
}

// User Editable Region

function addTwoNumbers(a, b){
return sum;
}
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 + "\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/128.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

This function takes two numbers a and b.
But it doesn’t add them up and it doesn’t return the result of adding them up?

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.