Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

Tell us what’s happening:

realistically I’m brand new to any sort of coding and i have looked up answers to most of these. im just trying to catch on to some of it at a time but no matter how hard a i try even to cheat i cannot get find or figure out the answer to this one and i have been on it for atleast 90 minutes at this point

Your code so far

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

function padRow(name) {
  return name;
}

// User Editable Region

function addTwoNumbers(a, b) {
 return "5 + 10"
}
let a = 5;
let b = 10;
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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 Edg/131.0.0.0

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 55

it is saying it is hard coded but even in looking that up i dont understand how to fix it

i have figured it thanks to other peoples problems and alot of problem solving this stuff is fun but oh so very hard

1 Like