Google Crashing When Using "For" Loops


Whenever I use any type of "for" loop, crashes and I have to exit the page then go back.


Hi @coding ,

Could you post one of those for loops here, so we can take a look at it?


Can we see your code? In most cases, if you work with loops, and it keeps crashing, you have a infinity loop

@geomaticmashups, you beat me too it by 3 seconds


Yep, that's what I was thinking, @stetim94 ...


We're stuck in an infinite reply loop ... :wink:


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


Just moving this topic over to the lounge :smile:


yep, infinity loop. This will only temporary add 5 to i, you need to do:

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

i doesn't get upgrade if you do not do this


Why? I think this loop is part of the exercise? You don't think so?


@coding ,

Yes, it is an infinite loop. The i + 5 does not update the value of i. You need i += 5.


I don't know what the "+=" means. Could you tell me what it is?


yea, += is a shorthand. full out this would be:

i = i + 5


Okay, thank you for helping me out with this.


Oops my bad, been a long day :frowning: Thought it was a problem with google at first glance I'll move it back.


No problem, the title is a bit misleading, i can understand the confusen after a long day