How to use
Find (load) the js file you want to format, select the save location, and click the run button to complete the formatting
Often the js code we get from other websites looks like this:
<script language="JavaScript">var i=0,s="",k=0;function foo(){for(j=0;j<10;j++){for(i=0;i<10; i++){s="string1";k=Math.floor(Math.random()*10);}for(i=20;i>9;i--){s="string2";k=i; }}}</script>
After conversion by this tool, it looks like this:
<script language="JavaScript">
var i = 0, s = "", k = 0;
function foo()
{
for(j = 0; j < 10; j++)
{
for(i = 0; i < 10; i++)
{
s = "string1";
k = Math.floor( Math.random()*10);
}
for(i = 20; i > 9; i--)
{
s = "string2";
k = i;
}
}
}
</script>
Doesn’t it look very enjoyable, haha.
it works
it works
it works