title: Reversing elements of an array
body: <p>Given an array  a and two other  int variables,  k and  temp, write a loop that reverses the elements of the array. </p>
  
  <pre><code>for (k = 0; k &lt; a.length-1; k++) {
    temp = a[k];
    a[k] = a[a.length-1-k];
    a[a.length-1-k] = temp;
  }
  </code></pre>
  
  <p>This is not working. Any idea why?</p>