Tagged as: Global variables

Re-blog: Squash Variable Leaks with Siesta

This is a re-blog of a great recent blog post by Brian Moeskau at Extensible.

JavaScript makes it incredibly easy to create global variables accidentally, which is inefficient and can also lead to very hard-to-debug bugs later. Simply omit the var keyword before a variable assignment, and you’ve inadvertently leaked a variable by defining it in the window scope.

Detecting Leaks with Siesta

Siesta, an awesome …