Write JavaScript in one pane, watch it run in the other — in a worker that can be killed.
A frontend app built by Ananda Rizki. More of them at Labs.
› output appears here
App
JS Playground
A two-pane JavaScript scratchpad: the source in one pane, whatever it printed in the other. The code runs in a Web Worker rather than on the page, which is what makes an unbounded loop survivable — a watchdog terminates the thread after two seconds, because terminating it is the only thing that stops a loop that never yields, and every run gets a fresh worker so nothing leaks from one into the next. Output is formatted rather than stringified: Maps, Sets, circular references, sparse arrays and getters each print as themselves, and error line numbers are mapped back to the editor's own numbering. The editor is CodeMirror, with completion scoped to what the sandbox actually exposes instead of the page's globals. Panes stack or sit side by side in either order, and the layout is remembered.
Built by Ananda Rizki, a frontend developer — one of the small web apps he writes for fun at Labs.