How do you stop an infinite loop in Javascript?

2018 update:

In Chrome 67, if you have the DevTools open (F12), you can end the infinite loop without killing the whole tab:

  • Go to the Sources panel and click “Pause script execution”.
  • Hold that same button and now select the “Stop” icon.

enter image description here

https://developers.google.com/web/updates/2018/04/devtools#stop

Leave a Comment