JavaScript Course Broken


#1



https://www.codecademy.com/courses/javascript-beginner-en-NhsaT/0/5?curriculum_id=506324b3a7dffd00020bf661


The JavaScript course crashes when you submit any results on the "Introduction to For Loops" page. The subsequent page does the same, so I can't proceed. It gives you a console error that says "Uncaught: [object event]".

Browser refresh does not work either. You have to close the tab to get out of it.

(Edited to include code.)


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


#2

Could you paste your code please? You might accidental be using an infinite loop, which would cause it to crash.


#3

Try changing i + 5; to i +=5. Also for this lesson you would want i < 50 to be i < 51. It's a less than operator so it won't reach 50 if 50 is there.

Let me know if this fixes it


#4

Thank you! I guess that "i + 5" was causing an infinite loop. It works now.

I think I posted in the wrong place, but thanks for responding anyway. :slight_smile:


#5

No problem bro! I'm almost 100% sure I made that mistake too the first time I went through it XD Hey could you click the check box that says this reply solved the question? I'm trying to get the Help Desk (Bronze) badge and that'd help out a lot! :sweat_smile: