There page breaks when I run the tests

Hello guys,

When I run the tests of this exercise https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/iterate-with-javascript-while-loops,
Then the page breaks.

Can you help?
Thank you.

What is your code? That is probably a sign that you are creating an infinite loop.

3 Likes

Above is correct. The site will auto refresh and start running the code. If you write it top to bottom, the loop will start and it won’t count up (since you haven’t typed i++ yet) and crash.

comment out one of the variables until you are done with the code.

1 Like

I indeed had forgotten to increment the i by 1 on every loop. Thank you guys :slight_smile: