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

Cuéntanos qué está pasando:

I am applying this way of doing the exercise but it tells me that it is not the correct way that I am doing it wrong?

Tu código hasta el momento

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


// User Editable Region

let character = "character";
function padRow(name) {
  return name + character;
}
padRow(name)

// 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);

Información de tu navegador:

El agente de usuario es: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36

Información del Desafío:

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

Welcome to the forum @sergio4

Variables declared using the const keyword are only declared once.

image

This is why the console is showing a syntax error.

Please remove the let declaration.

Also, the instructions did not ask you to call the padRow function.

The hint message will guide you what to do next.

Happy coding