JavaScript-formatter

JavaScript verfraaien en minificeren

Inspringing:
Invoer
Uitvoer
Het opgemaakte JavaScript verschijnt hier...

Voorbeelden

Type JavaScriptToepassen
Opmaken function greet(name){if(!name){return "Hello!"}return "Hello, "+name+"!"}
Opmaken const users=[{id:1,name:"Ann"},{id:2,name:"Bob"}];const names=users.map(u=>u.name).filter(Boolean);
Opmaken class Queue{constructor(){this.items=[]}push(x){this.items.push(x);return this}pop(){return this.items.shift()}get size(){return this.items.length}}
Opmaken async function load(url){try{const res=await fetch(url);if(!res.ok)throw new Error(res.status);return await res.json()}catch(e){console.error(e);return null}}
Minificeren function add(a, b) { // sum two numbers return a + b; }
Minificeren export const TAX = 0.23; export function gross(net) { return net * (1 + TAX); }
© 2026 Developer Toolbox. Alle rechten voorbehouden. Over ons