Infinite loops


#1



Random question: the first exercise mentions crashing your computer with an infinite loop. Is this something to be concerned about, and if it does, is there any coming back from it?


Replace this line with your code.


#2

Once an infinite loop happens, there is no way to break it. The only way to recover is to restart the program. For example, if you create an infinite loop in Codecademy, you'll notice that it won't let you move onto the next lesson until the process is over. Since there is no way to end it after it begins, you must refresh the page, stop the infinite loop from happening in the first place, then move on. It is definitely something to look out for as there is no reason I can think of that makes it useful other than the purpose of slowing/stopping the computer.

Hope this helps! If not, feel free to reply and I'll try to go more in-depth.


#3

Okay, so heaven forbid I do this in terminal, I can simply restart terminal. Just checking :slight_smile:


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.