w4ik
w4ik

Reputation: 1276

What are your techniques for discovering unwanted global variables in javascript

Since global variables in javascript are anything but best practice, I'd like to discover any unintentional global variables in javascript...just noticed one in a method I'm currently working on. So my question is...

What techniques, other than a careful reading of code, do you use to discover unwanted global variables?

Are there any tools available for this purpose?

Found this page, Remy Sharp's bookmarklet for detecting global vars, on a quick google search, but I'm wondering if there are others?

Upvotes: 0

Views: 74

Answers (1)

Matt Ball
Matt Ball

Reputation: 359816

enter image description here

Upvotes: 5

Related Questions