Javascript array search
<p>Whats the best way to search a javascript array for an entry??
All the items will be strings.</p>

<p>Is it simply by using lastIndexOf? like so:</p>

<pre><code>var list= [];
list.push("one");
list.push("two");
list.push("three");

if(list.lastIndexOf(someString) != -1)
{
    alert("This is already present in list");
    return;
}
</code></pre>
