So I\'ve been reading through Javascript - The Good Parts and one thing that Crockford points out is the use weakness of global variables in Javascript, in such a way that if yo
To create applications with javascript, you must attempt to keep variables in a local scope, and anything inside a namespace. It's a good pratice and prevent a serie of harm codes and unespected behaviors.
read this
it's a article talking about the vantages of doing that.