Page crash


I don't know why but when I try to submit my code the page always crashes and I can't go on with the course.

for(var i=100; i>0; i+=5){


look at the loop. i will be 100, in the beginning and while greater then zero, continue running. which means it will increase in steps by 5, from 100 till infinity.

You either should decrease i by 5 (you currently increase i by 5 in each iteration, thanks to i+=5), this way i will be smaller then zero at certain point, the loop condition will evaluate to false, the loop will exit

Or reverse it, start at zero until 100, depending on what the exercise wants of you


I believe the exercise wants you to "print out" iterations of 5 from 100 down to zero.

So your "for" loop should start at 100 and as long as it is greater than 0 iterate down by 5.The mistake you made was you iterated UP by 5, which executes an infinite loop because 100 will always be greater than 0 especially if you keep adding 5 to it. Infinite loops right away crash your web browser.

for (var i = 100; i >0; i -= 5) {

Hope that helps.


Thank you and sorry for my stupid mistake: I hate when it's something so basic