Learn Introductory JavaScript by Building a Pyramid Generator - Step 32

Tell us what’s happening:

i am still being asked to log the value of i, please help and i have tried every variation… just i in the console does nott work

Your code so far

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

// User Editable Region

for (let i = 0; i < 8; i = i + 1) {
  console.log( i);

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge Information:

Learn Introductory JavaScript by Building a Pyramid Generator - Step 32

Hi there! You’ve modified the original code. Reset the task and just log the i iterator

My code is exactly the same. It still doesn’t work.
for (let i = 0; i < 8; i = i + 1) {

I don’t know what the issue is. When I open the dev tools on my browser, it loops 8 times through the array and outputs the values.

Am I missing something here?

Did you reset the task?

YES, still hasn’t solved the issue.

This is the original template for this step.

for (let i = 0; i < count; i = i + 1) {


Where did you get this?
i < 8;

Don’t modify anything, just print the value of the i iterator within this loop

OH Crap, I just realized. I forgot that count was the condition. Instead I hardcoded 8 into the condition.

1 Like

Just glad I could be of help.
Good luck in your further coding

}  brackets and not outside thanks ```

make sure console.log(i) is in your brackets and not outside as you have been doing.

Hi there! The problem in this topic is solved. Thanks

1 Like

yes it is solved
but just incase everyone done what i done that is why i shared as that was the mistake i made thanks for everone’s help

OK, thank you.
And I’ve edited your message for readability. Please don’t use backticks to write the plain text.

1 Like

ok thanks for that so when do you use back ticks and when do you not use them thanks.

1 Like