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

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

Your solution works from my end. Please try one of the following steps to move forward.

Click on the “Restart Step” button and force a refresh of your page with CTRL + F5 then try to paste the code in again.

or - Try the step in incognito or private mode.

or - Disable any/all extensions that interface with the freeCodeCamp website (such as Dark Mode, Ad Blockers, or Spellcheckers), and set your browser zoom level to 100%. Both of these factors can cause tests to fail erroneously.

or - Ensure your browser is up-to-date or try a different browser.

I hope one of these will work for you.

you deleted the closing brace of the padRow function

2 Likes

that was the problem, in some step I deleted that brace by mistake, now it works perfectly. Thanks!

it was in this one, the starting code of each step does not depend on code you wrote in earlier steps