title: Swift for..in and for loop
body: <p>Why does for loop require var while for..in does not allow use of var?</p>
  
  <p>for loop</p>
  
  <pre><code>for var index = 0; index &lt; 10; i++ {
  
  }
  </code></pre>
  
  <p>for..in loop</p>
  
  <pre><code>for index in "test" {
  
  }
  </code></pre>
  
  <p>instead of:</p>
  
  <pre><code>for var index in "test" {
  
  }
  </code></pre>