quote:
Originally posted by ultimatebuster
Interesting..
I thought indexOf uses a hashtable algorithm rather than a brute force search trhough all the elements.
That may be the case for an Array.indexOf() implementation (which is not available in JScript), but String.indexOf() looks for substrings in a search string. It first has to find the first substring character in the search string and then check whether the other characters are also there, or look elsewhere. To find an item in an array in JScript, we need to rely on loops as there's no such function provided by the Windows Script Engine.