title: Replace value with item in array
body: <p>I'm really not sure how to explain what i'm trying to achieve, but what is the easiest way to do something like this (in javascript):</p>
  
  <pre><code>function switchItUp(i){
      ...
  }
  
  old_values = [1, 2, 3, 4];
  new_values = ['a', 'b', 'c', 'd'];
  
  switchItUp(3); // returns "c"
  </code></pre>