playground
JavaScript playground
Write some code, press Run, and see the result. The examples come from the projects and posts in this portfolio.
console.log, console.table, and objects formatted the way Node.js does.
// Press Run (Ctrl/⌘+Enter) to execute this code.
const projects = ["Cryptotool", "Steganalysis Web App", "Phoenix Chat", "Detektif Batavia"];
console.log("Hello from the playground!", projects.length, "projects loaded.");
console.log({ name: "Delfi", focus: ["web", "security"], available: true });
console.table(projects.map((name) => ({ name, length: name.length })));
const greet = (name) => `Hello, ${name}!`;
console.log(greet("visitor"));
console.warn("console.warn and console.error are captured too.");
console.log(new Map([["language", "JavaScript"], ["runtime", "Web Worker"]]));
No output yet.
Preparing the sandbox…
Ctrl/⌘+Enter runs the code · Esc then Tab leaves the editor
How the code runs
- Code runs in a Web Worker inside a sandboxed iframe with an opaque origin, so it can't read this site's cookies, storage, or page content.
- The sandbox's Content Security Policy blocks all network access (fetch, WebSocket) and eval.
- Each run is limited to 5 seconds and 500 lines of output; after that the worker is terminated.
- Your code is stored in your browser. Share links put the code in the URL's # fragment, which is never sent to the server.