Does JavaScript or jQuery have a function similar to Excel's VLOOKUP?
<p>Do JavaScript or jQuery have a function that returns the element of an array whose index equal to the position of a given value in another array? (I could write my own, but I don't want to reinvent the wheel.)</p>

<p>Something like:</p>

<pre><code>function vlookup(theElement, array1, array2) {
    $.each(array1, function(index, element) {
        if (element === theElement)
            return array2[index];
    });
    return null;
}
</code></pre>

<p>But, um... in the standard library.</p>
