5/13 Window crashes


#1

Here's what typed:

for (var i = 5; i < 55; i+5) {
console.log(i);
}

When I submit the code, the page is unresponsive and Chrome prompts me to kill the page. Is there something wrong with the code itself or is my computer just not able to handle it?


#2

You have created an infinite loop, which will crash your browser.
To fix this, your loop should be:

for (i = 5; i < 55; i += 5) {

The problem is that to increment i you need += not just +.


#3

Thank you for your help!


#4

@fortressdevs
Welcome! Just post anytime, and if I see it I will help!