Where is the string in an array?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/2457998/how-do-i-get-the-index-of-an-item-in-an-array">How do I get the index of an item in an array?</a><br>
  <a href="http://stackoverflow.com/questions/3721972/search-for-element-within-an-array">search for element within an array</a>  </p>
</blockquote>



<p>If I had an array like this:</p>

<pre><code>var array = [
    "one",    //element 0
    "two",    //element 1
    "three",  //element 2
    "four",   //element 3
    "five"    //element 4
];
</code></pre>

<p>I want to look for a given part, let's say <code>five</code>.
So I ask the code to tell if <code>five</code> is inside <code>array</code>.</p>

<p>If it is, then it should tell me that it's position is <code>4</code>, or <code>array[4]</code>.</p>

<p>Is there any way I could achieve a similar effect?</p>
