Hitting an infinite loop when programming is annoying; it takes a while before the browser kicks in and stops the loop, if it does at all, or else the browser will crash and you'll have to restart it. Either way, it takes a while to get back to programming again, and in the meantime your computer may have overheated if it's old, or whatever.
My suggestion is to copy CodePen and implement infinite loop protection (two links). I think that if the course detects an infinite loop and breaks it up, it'll be much less annoying/stessfull/whatever else to a user trying to figure out what's wrong if a little popup comes up instead, saying something like:
You've got an infinite loop in your code, so we stopped your code from running see more on infinite loops here. If you think this is a mistake and that we shouldn't have stopped your code, you can force run it, but be careful!
Just a suggestion, but I think it would really be very helpful to new users.
Do you want infinite loop protection in Codecademy?
- Yes, I want infinite loop protection in Codecademy
- No, I don't want infinite loop protection in Codecademy
- I don't care if Codecademy has infinite loop protection or not