title: how to get the index of selected element in react native array
body: <p>I want an index of the selected element in the react native array. I tried with indexOf() but it always returns -1. <code>School</code> is my array &amp; <code>email</code> contains the value of the element whose index to find.</p>
  
  <pre><code>deleteDetails = (email) =&gt; {
    var index = School.indexOf(email);
  }
  </code></pre>