4 ms·
They have to solve the problems JSBin and like solved years ago all over again. Starting with infinite loops ;)
by msoad 3y ago
They have to solve the problems JSBin and like solved years ago all over again. Starting with infinite loops ;)
- ogaistan 3y agoFunny that you mentioned this as I added some heuristics to my playground [1] yesterday for this use case. It relies on Babel [2] which looks for `for`, `while` and `do-while` loops and injects a counter that throws an 'infinite loop detected' error to prevent the browser freezing. You can opt out if you know what you are doing. It's not perfect, but it covers this base cases. [1] https://www.jsplayground.dev https://www.jsplayground.dev [2] https://babeljs.io https://babeljs.io