title: 'Variable' was used before it was defined
body: <p>I am checking if a variable is defined or not, and if it is not defined explicitly I am going to define it by doing:</p>
  
  <pre><code>if ( typeof(aVariable) == 'undefined' ) {
    var aVariable = value;
  }
  </code></pre>
  
  <p>Because the variable is not defined JSLint warns that it is used before it is defined, and that is exactly what I want.</p>
  
  <p>How can I overcome this?</p>
  
  <p>I want to enable defining those variables explicitly doing this:</p>
  
  <pre><code>&lt;script&gt;
    var aVariable = value;
  &lt;/script&gt;
  &lt;script src="myScript.js"&gt;&lt;/script&gt;
  </code></pre>
  
  <p>So everyone who is going to include this script can customize some of the properties. And I am afraid I cannot change this logic because it is already being used in hundred of web sites this way.</p>
  
  <p>Scroll down for the answers/solutions, because I have answered my own question Stack Overflow does not show it up. Be sure not to miss them.</p>