Learn Introductory JavaScript by Building a Pyramid Generator - Step 43

Tell us what’s happening:

I believe I’m entering the right code. However, when I check my code, it doesn’t go through. I do it once and once again, but it still doesn’t work. Can I get help, please

Your code so far

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

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

let result = ""


// User Editable Region

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

// User Editable Region


console.log(result);

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 43

Hi @panchoderancho2,

You are so close, but be sure to read the instructions carefully. The \n newline character should be at the very end of the operation, not in the middle.

1 Like

make sure you follow the step instructions. if you add something extra. it will mark it as error. Since the freecodecamp tutorial goes for an exact matching.

you can also try some online compiler/interreter tools to see how your code is functioning and try debugging there or you can ask here.