Are semicolons in JavaScript functions declarations ever necessary
<p>Is it ever necessary to add a semicolon at the end of a function definition like the following </p>

<pre><code>function helloWorld() {
     //some code 
}; //note the semicolon here at the end is it ever necessary? Ever
</code></pre>

<p>I have a friend that swears this is optional. I think it is never optional I have never read anything about it being optional at the end of a function. I have never seen any one ever do that "Except him". Is the semi colon optional.</p>

<pre><code>var hellWorld = function (){

}; // the semicolon here it is optional because you are defining a variable this is OK and optional 
</code></pre>
