Browser Freezing When Submitting An Exercise

The most common reason that browsers crash when you submit code is that you have mistakenly written an infinite loop in your code.  Infinite loops will run forever and cause the tab that you're in to freeze.

If you have written a loop of any kind (e.g. "For", "For/In", "While", or "Do/While") and you have made a mistake when setting the conditions of the loop, you may have created an infinite loop.

You can follow these steps to fix it:

  1. Close the tab that Codecademy is running in
  2. Open a new tab and navigate back to the same exercise
  3. Take a close look at the conditions of any loop that you have created, pay close attention to any "<" or ">" characters and ensure that you have set the stop point correctly.
  4. After editing this code, click "Submit" again to see if you have corrected your loop.
  5. If you are still seeing you browser freeze, repeat steps 1-4 until you have found the error.

If you are not able to find the error in your loop after a few attempts, click the "Reset Exercise" button at the bottom of the page and start again.

Was this article helpful?
3 out of 12 found this helpful
Have more questions? Submit one here.


Article is closed for comments.