Now, thanks to jQuery we have a javascript alternative for PHP’s in_array function.
Let’s have an array:

var my_array = ["I", "love", "short-tag.info", 99];

It will work with mixed arrays as you can see in the example above.
Now, let’s do a few searches:

var pos1 = jQuery.inArray("love", my_array);

It will return 1, since this is the index of the 2nd [...]