title: Why need to pass jQuery object as parameter to closure?
body: <p>To avoid global variables in JavaScript code I many times seen that people use this construct:</p>
  
  <pre><code>(function($) {
      // here code
      // here code
  })(jQuery);
  </code></pre>
  
  <p>So I have questions: why we need to declare function argument as <code>$</code> and why we need to pass <code>jQuery</code> object as argument?</p>