|
There are several free formatters out there. Criteria I'm interested in is: (1) Accuracy, (2) Convenience - ideally an online tool as opposed to something I need to download, (3) Cost - ideally it'd be free, and (4) Length - I'd want it to be able to format large scripts, not just some 5 line demo.
There seems to be a lot to choose from: http://www.google.com/search?hl=en&q=JavaScript+formatter
Currently I'm looking at: http://www.jwmdev.tzo.com:8080/resources/js-tools/index.html
I'm also finding the NotePadd++ language feature helpful with this because it (1) color highlights JavaScript, and (2) match thes parenthesis and brackets for you (including nesting), making it very easy for you to format it yourself as you run through what the code actually does.