Often, when a program is run and the browser becomes unresponsive and crashes, this means that your student has written an infinite loop into their program.

Infinite loops occur when loops (often while loops) have no exit condition, so when the program is run it loops forever with no break, causing the browser to crash.

A good way to isolate infinite loops is to comment out different sections of code, running the program to see where the infinite loop is occurring.  Once the program runs successfully, you know that your infinite loop is in the commented section of code.

Did this answer your question?