title: Tuple swap with indexOf
body: <p>I'm trying to swap positions of elements in this array with a tuple swap and <code>indexOf()</code></p>
  
  <pre><code>array1 = [1, 2, 3, 4, 5, 6, 7, 8]
  </code></pre>
  
  <p>should equal:  <code>[1, 2, 4, 3, 5, 6, 7, 8]</code></p>
  
  <pre><code>[ array1[array1.indexOf(3)], array1[array1.indexOf(4)] ] = 
  
  [ array1[array1.indexOf(4)], array1[array1.indexOf(3)] ] 
  
  </code></pre>
  
  <p>the evaluated result is simply the swapped elements and not the array itself..</p>
  
  <pre><code>[4, 3]
  </code></pre>
  
  <p>How can I get the whole array back?</p>