Skip to content Skip to sidebar Skip to footer

Do Infinite Loops Of Javascript Crash The Browsers These Days?

I am learning JavaScript and am quite new in Programming and happened to land upon these infinite loops which were said to go on forever and crash the browser, but when I created o

Solution 1:

Yes, Infinite loops do still crash browsers (Or just the tab the JS is running in). However, most modern browsers can detect if a script's hanging / running a infinite loop, and give you the option to abort the script.

Also, a more efficient way to create a infinite loop, would be:

while(true);

Post a Comment for "Do Infinite Loops Of Javascript Crash The Browsers These Days?"