title: Swift / transferring objective c code / iterate in for loop / Type XY has no subscript members
body: <p>I have the following for loop in Objective C code and am trying to transfer it to Swift.</p>
  
  <pre><code>double lastAx[4],lastAy[4],lastAz[4];
  for (int i = 0; i &lt; 4; ++i){
  lastAx[i] = lastAy[i] = lastAz[i] = 0;
  }
  </code></pre>
  
  <p>My Code so far gives me the error: <code>Type Double has no subscript members</code></p>
  
  <pre><code>var lastAx:Double = 4
  var lastAy:Double = 4
  var lastAz:Double = 4
  
      for i: Int32 in 0  ..&lt; 4  {
          lastAx[i] = lastAy[i] = lastAz[i] = 0
      }
  </code></pre>
  
  <p>What am I missing? Help is very appreciated.</p>