Cuéntanos qué está pasando:
Even though I’ve searched on the internet and the forum what’s the problem on my code, I still don’t find the mistake. I’ve declared the function with two parameters, return the sum of them, then declared the variable sum and assigning it the two required numbers and log it. From the declaration of the variable sum it’s grey-written, like if shoulnd’t be there and I’ve tried to change many things and still don’t work, thanks in advance!
Tu código hasta el momento
const character = "#";
const count = 8;
const rows = [];
function padRow(name) {
return name;
// User Editable Region
function addTwoNumbers(a, b) {
return a + b;
}
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";
}
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/134.0.0.0 Safari/537.36
Información del Desafío:
Introducción a JavaScript aprendiendo a construir un Generador de Pirámide - Step 55