Tell us what’s happening:
Trying to call my padRow function.
At least nothing worked and im confused.
Code where the Problem is, is marked with ( <-Problem is here!)
Your code so far
const character = "#";
const count = 8;
const rows = [];
function padRow() { <-Problem is here!
const call = "Testing"; <-Problem is here!
return call; <-Problem is here!
}
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 ist: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36
Challenge Information:
Learn Introductory JavaScript by Building a Pyramid Generator - Step 61