JS Playground
App
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 with
- Related