Tell us what’s happening:
whats wrong with this i cant pass this step :
const character = “#”;
const count = 8;
const rows = ;
let result= “”;
for (let i = 1; i <= count; i++) {
rows.push(character.repeat(i));
}
for (const row of rows) {
result += row + “\n” ;
}
console.log(result);
Your code so far
const character = "#";
const count = 8;
const rows = [];
// User Editable Region
let result= "";
for (let i = 1; i <= count; i++) {
rows.push(character.repeat(i));
}
for (const row of rows) {
result += row + "\n" ;
}
console.log(result);
// User Editable Region
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) 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 44