do it!
JavaScript Code prettifier
Please paste your JavaScript code in the first text area and press "do it".
Original Code
var obj1={a: [2,3,4],b:true,c:1.23,d: {e:1.23,f:"hello", f1: function(a, b, c){var v2=1; /* before this switch */switch(v2){case 0: (function(a){})(2); break; case 1: alert('good'); break; default: alert('def'); }; return a*b+c; }}}; var s1="seba"; var r = window?'inabrowser':'notabrowser', ol = (function(n){var c = 15; while(c!=0){ this.y=( --c )*n; }; do {alert('error')} while(true){}{}})(9); var a=0; /* hello world */ var b = 0; if(true) false; if("".length===1 && a != "Apple"){alert('pp'); } /*hello*/ else if("".length==2){alert('ee'); } //world else if("".length==3){alert('33e'); } else if("".length==4)alert('44'); else {alert('kk'); } for(var i in o){alert(i+'='+o[i])}; for(var j=7; ; ) {if(false){continue; }else{break; }}; try{"hello"; throw "error"; } catch(ex){"world"; alert(ex); } finally{alert('nightmare end')} var a = typeof Object; function f1(a, b){alert('seb'); return a+b; }; var o = {a: 1, b: 2}; with (o) { alert(a+b);} var Class1=function(name){this.name=name}; Class1.prototype.sayHello=function(){return "hello "+this.name; }; var c1 = new Class1('albert'); eval("alert('helloworld');"); var f=function(a){for(var i=0;i!=10;i++){alert(i);}}; var s=2,f=function namedf(a){};
Prettify 1
Prettify Style 1