Is there a tool for validating my whole javascript code, spread in several files? I would like to automatically remove variables, loops, and functions that are not used, that are merey leftovers from previous versions.
@Thomas-authorJul 25.2007 — #No tools for this? I actually found a tool by Software Verification. It will go through your website and check for unused code. I have a hard time getting it to work though, and it isn't free. Surely there must be alternatives... ?
@felgallJul 25.2007 — #Well most programmers now put ALL the JavaScript in one file and just link that into the head of each page that needs it. If they do link several files in then each provides separate functionality and can therefore be considered separate from any other file. The days of scattering JavaScript inside the HTML is past. A program such as you are looking for is therefore unnecessary for properly coded JavaScript.
@Thomas-authorJul 25.2007 — #felgall, your points are valid and I have decided to merge my files into one or a few. However, the problem is still the same. How can I spot unused functions, loops, etc. in my webpage?