title: Identify prime number
body: <p>For some reason, it always gave me the wrong result. It's always <code>isItPrime = true</code> no matter what number was assigned to the "number" variable.</p>
  
  <p>This is my code:</p>
  
  <pre><code>let number = 6
  var i = 1
  var isItPrime: Bool?
  while i &lt; number {
      if number % i == 0 {
          isItPrime = false
      } else {
          isItPrime = true
      }
      i += 1
  }
  print(isItPrime)
  </code></pre>
  
  <p>Can somebody explain to me what's wrong with my code and why the <code>isItPrime</code> bool outputs always <code>true</code> ?</p>