Why are globals bad?
<p>It totaly makes sense to me to use it here. 
What would be the alternative? How can i generaly avoid to use them and most of all why is it bad according to jsLint to make use of globals.</p>

<pre><code>(function($){
  $(function(){
   $body = $('body'); //this is the BAD Global

   $.each(somearray ,function(){ $body.dosomething() });

   if (something){
     $body.somethingelse();
   }

  });
}(jQuery));
</code></pre>

<p>Can you help me understand this? And give me a better solution?</p>
