title: Difference between 'for index' and traditional 'for loop'
body: <p>I'm new to Swift and pretty new to programming. I'm not sure if it's because it's 2:34 am but can somebody help me identify the difference between these two loops? </p>
  
  <p>The first one is resulting in the values I want yet uses (as the Swift documentation explains) a 'traditional C loop' where the one after is using what seems like a Swift preferred 'for index' loop (which I personally like as it is clearer to me), the problem is that this loop returns every number rather than meeting the conditional.</p>
  
  <pre><code>func findLargestPrimeFactor(number: Int) {
      for var i = 2; i &lt; number; i += i {
          if number/i % 1 &gt; 0 {
  
          } else {
              print(i);
          }
      }
  }
  
  findLargestPrimeFactor(13195);
  </code></pre>
  
  <p>Below is returning every number to 13195</p>
  
  <pre><code>func findLargestPrimeFactor(number: Int) {
      for i in 2...number {
          if number/i % 1 &gt; 0 {
  
          } else {
              print(i);
          }
      }
  }
  
  findLargestPrimeFactor(13195);
  </code></pre>