title: Google sheet script, how to check if string already in array?
body: <p>This indexOf doesnt work anymore nowadays. There is method valueOf but seems to be doing something different. 
  Im trying to do something like that :</p>
  
  <pre><code>var emails = [];
  emails.push("sample@email");
  if (emails.indexOf("sample@email") &gt; 0) { //if this mail exists in array
  //do something
  }
  </code></pre>
  
  <p>Doesnt work this way.</p>