title: Is it better to define vars outside of loops?
body: <p>Is the second better than the first?</p>
  
  <p><strong>FIRST:</strong></p>
  
  <pre><code>var count:int=myArray.length;
  for(var i:uint=0;i&lt;count;i++)
  {
     var str:String=myArray[i].label;
     var somethingElse:Class=...;
     var andAnotherThing:MyInstance=new MyInstance(somethingElse);
     ...
  }
  </code></pre>
  
  <p><strong>SECOND:</strong></p>
  
  <pre><code>var count:int=myArray.length;
  var str:String;
  var somethingElse:Class;
  var andAnotherThing:MyInstance;
  for(var i:uint=0;i&lt;count;i++)
  {
     str=myArray[i].label;
     somethingElse=...;
     andAnotherThing=new MyInstance(somethingElse);
     ...
  }
  </code></pre>
  
  <p>Thank you.</p>