Using semi-colons to close functions in JavaScript. Necessary? : <p>When executing a function in JavaScript, I've always ended my code block with a semi-colon by default, because that's what I've been taught to do. Coming from Java it felt a bit unorthodox at first, but syntax is syntax.</p>

<pre><code>function semiColon(args) {
   // code block here
};
</code></pre>

<p>or</p>

<pre><code>function sloppyFunction(args) {
   // code block here
}
</code></pre>

<p>Lately I've been seeing more and more code where the developer left the semi-colon out after functions, but the intended code still executed normally. So are they actually required? If not, why is it common practice to include them? Do they serve another purpose?</p>
