Introducción a JavaScript aprendiendo a construir un Generador de Pirámide - Step 66

Cuéntanos qué está pasando:

I’ve tried following what I’ve found in forums, I’ve also tried with this;
function generatePattern(rows, character) {
let result = ;
for (let i = 0; i < rows; i++) {
}
return result;
}
But I’m still getting the same error message " You should call padRow in your .push() call" :\ It’s so frustrating!!

Tu código hasta el momento

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

function padRow(rowNumber, rowCount) {
  return character.repeat(rowNumber);
}



// User Editable Region

for (let i = 0; i < count; i = i + 1) {
  rows.push(rowNumber);
}

// User Editable Region


let result = ""

for (const row of rows) {
  result = result + row + "\n";
}

console.log(result);

Información de tu navegador:

El agente de usuario es: Mozilla/5.0 (X11; Linux x86_64; rv:133.0) Gecko/20100101 Firefox/133.0

Información del Desafío:

Introducción a JavaScript aprendiendo a construir un Generador de Pirámide - Step 66

Hi @jpacheco.jls

What is rowNumber?

Replace the character.repeat(i + 1) in your .push() call with a function call for your padRow function.

Happy coding