title: What does this "(function(){});", a function inside brackets, mean in javascript?
body: <blockquote>
    <p><strong>Possible Duplicates:</strong><br>
    <a href="https://stackoverflow.com/questions/3921922/what-does-this-mean-function-x-y-a-b-in-javascript">What does this mean? (function (x,y)){&hellip;}){a,b); in JavaScript</a><br>
    <a href="https://stackoverflow.com/questions/440739/what-do-parentheses-surrounding-a-javascript-object-function-class-declaration-me">What do parentheses surrounding a JavaScript object/function/class declaration mean?</a>  </p>
  </blockquote>
  
  
  
  <p>Hi All</p>
  
  <p>I don't know what the following does:</p>
  
  <pre><code>(function(){
    // Do something here
    ...
  })(someWord) //Why is this here?;
  </code></pre>
  
  <p>My questions are:</p>
  
  <ol>
  <li>What's the meaning of putting a function inside brackets .i.e. <code>(function(){});</code>?</li>
  <li>What do the set of brackets do at the end of a function?</li>
  </ol>
  
  <p>I usually see these in jquery codes, and some other javascript libraries.</p>