javascript where to put the var statement
<p>I have a function that looks like this:</p>

<pre><code>function SomeFunction() {

  var SomeVar;

  if (SomeCondition) {
     SomeVar = 4;
  }
}
</code></pre>

<p>This is equivalent to:</p>

<pre><code>function SomeFunction() {

  if (SomeCondition) {
     var SomeVar = 4;
  }
}
</code></pre>

<p>Does using the var statement only if the condition is true make a difference or not, is there any best practice or <strong>performance implications</strong> concerning this?</p>

<p>Thanks.</p>

<p><strong>Edit: yes, I am aware that there's no block scope, just function scope.</strong></p>
