If you are working on Loops and you notice your learning environment is experiencing connection issues, you are likely caught in an endless loop.
There is an easy way to escape a loop. If you find yourself in a loop, you can follow the instructions found inside the lesson and also here:
"If you notice the Run button spinning continuously or a “Lost connection to Codecademy” message in an exercise, you may have an infinite loop! If the stop condition for our loop is never met, we will create an infinite loop which stops our program from running anything else. To exit out of an infinite loop in an exercise, refresh the page — then fix the code for your loop."
Escaping the loop and fixing your code should allow your code to run properly and prevent the disconnection.