This code crashes my browser


when i press save and submit it just doesn't load and then i have to kill google chrome

for (var i = 5; i < 51; i+ 5) {


Hey @drrake What you're doing is very dangerous,, constantly running the code without correcting the problem is causing infinite loops.

An infinite loop is caused when you don't increment a loop and your code is continually printing up and will never stop until you increment it or stop it manually.


Try adding an equal sign after your + sign here..

(i += 5)


sorry for the very late reply, i have been focusing on my coursework and have not had time to do any code academy, can you explain what the "=" symbol actually changes as when i ran it it worked completely fine


i+5 computes a value here i is 5 +5 is 10. So you compute the value of ten but the value of i remains 5.
i+=5 on the other hand is a short cut for i=i+5 here again you compute the value 10 but you assign it back to i effectively increasing the current value of i by 5. This way i will grow with every loop until it reaches 55 where the condition is now false and the loop is quit.

My code keeps crashing my web browser, is this normal?

I think @haxor789 has explained it very clearly. I was also offline for a bit. :sweat_smile:


ahh thank you for the explanation