variable named undefined in Javascript Libraries
<blockquote>
  <p><strong>Possible Duplicates:</strong><br>
  <a href="http://stackoverflow.com/questions/2716069/how-does-this-javascript-jquery-syntax-work-function-window-undefined">How does this JavaScript/JQuery Syntax work: (function( window, undefined ) { })(window)?</a><br>
  <a href="http://stackoverflow.com/questions/5020479/what-advantages-does-using-functionwindow-document-undefined-window">What advantages does using (function(window, document, undefined) { &hellip; })(window, document) confer?</a>  </p>
</blockquote>



<p>i have seen many javascript libraries create a variable named "undefined", iam unable to figure out its purpose, below are lines copied from jQuery library</p>

<pre><code> * Date: Wed Feb 23 13:55:29 2011 -0500
 */
(function( window, undefined ) {

// Use the correct document accordingly with window argument (sandbox)
var document = window.document;
var jQuery = (function() {
</code></pre>

<p>Please suggest me the reason and benefits of doing so!!</p>
