Page crash pls help


I dont create an infinite loop but my page becomes unresponsive after i hit the submit code button. I'm really stuck and dont know what to. pls help.
Here' s my code:
for(int i=5;i<51;i+5)

Thanks in advance.


i+5 is not the right syntax. You are telling it how much to increase. To tell it to increase by 5, you would say i+=5 since you're not really increasing i, you are creating an infinite loop.


code after modifying :
for(int i=5;i<51;i+=5)
could you tell me where i'm wrong?
Now the page has become responsive but shows some error.
thanks a lot.


You don't have {}? Also, int isn't how you set a variable in javascript. You use var.

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


Oh, got it. Since i' m learning other languages off a bit.
Thanks, it really. God bless you. :smile:


you have to write it as 1 = 1+5 not i=5


Thanks! I got it already.


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.