title: Warning: Duplicate variable definition
body: <p>If I have 2 <code>for</code> loops both declaring <code>var i</code>, then the second will produce a warning:</p>
  
  <pre><code>public function twoLoops(){
      for (var i:int = 0; i &lt; 100; i++) {
      }
  
      for (var i:int = 0; i &lt; 100; i++) { // i is already declared once
      }
  }
  </code></pre>
  
  <p>I understand the reason this happens, it's explained in <a href="https://stackoverflow.com/a/10743168/820750">this answer</a>, but is there a way around it (except for declaring <code>i</code> at the beginning of the method)?</p>