array_flip in javascript?

Is there any shortcut to accomplishing the equivalent of PHP’s array_flip in javascript or does it have to be done via brute force looping?

It has to be used for dozens of arrays so even small speedups will probably add up.

array_flip in javascript?