Run JavaScript online — Node 20/22/23/24/25/26, real V8, in a Firecracker microVM.
JavaScript is the most-deployed language on Earth — the browser is the runtime everyone has. Server-side, Node ate the world; TypeScript is JavaScript-with-types (see /lang/typescript).
ls-judge runs JavaScript on real Node.js: Node 20 LTS, Node 22 (LTS), Node 23, Node 24, Node 25, and Node 26 (current LTS). V8 is V8. The event loop actually loops.
Bring a single .js file (single-file console script) or multi-file with `require`/`import` — external `node_modules` are unavailable (no network), but pasted local modules work.
Perfect for JSON munging, algorithm work, HTTP-request-parsing challenges — Node's stdlib is generous.
Clicking "Run now" opens the playground with this exact code and a matching test case pre-loaded — passes on first Run.
const lines = [];
process.stdin.on('data', d => lines.push(d.toString()));
process.stdin.on('end', () => {
const n = parseInt(lines.join('').trim());
console.log(n * 2);
});
21
42