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):
function switchItUp(i){
...
}
old_values = [1, 2, 3, 4];
new_values = ['a', 'b', 'c', 'd'];
switchItUp(3); // returns "c"