FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Catching unused variables

 


rohan2kool
I've made a small JavaScript script to parse a custom text-format i made for an app. Now the problem is that it's become quite big and i'm in the final stage : streamlining the script. For that i want to know all the variables which are initialized and not used anywhere else or only declared and not used anywhere in the script.

Are there any debuggers which can do this?
Ranfaroth
Maybe you could comment all the variable declarations, run your script, and look to the javascript console to see if undeclared variables are used. So you could list them, and remove the unused ones...
rohan2kool
Ranfaroth wrote:
Maybe you could comment all the variable declarations, run your script, and look to the javascript console to see if undeclared variables are used. So you could list them, and remove the unused ones...


that's a good idea.. but there are so many variables out there.. it's easy to miss out some.. but if there's no other way.. yours is the next best option i have [no offences m8].

thanks a lot for suggesting that.

sincerely,
rohan
Reply to topic    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.