title: indexof not working with MailApp.sendEmail
body: <p>I am trying to understand why the following code doesnt work:</p>
  
  <pre><code>function indextest() {
  var sheet = SpreadsheetApp.openById("1rMUrZFie94RLFDKaWVBPsQ-jebL8wNA6qsZWivMBDTk").getActiveSheet();
  var data = sheet.getRange("a1:a4").getValues();
  var a = data.indexOf("c");
  MailApp.sendEmail ("fakeemail@gmail.com", a ,"")
  }
  </code></pre>
  
  <p>I should receive an email with the text "3" in the subject line. Instead, I am receiving a "-1", implying it couldnt find "c" in the array "a1:a4". But when you go to the spreadsheet, "c" can be found in cell A3.</p>
  
  <p>Here is the spreadsheet:
  <a href="https://docs.google.com/spreadsheets/d/1rMUrZFie94RLFDKaWVBPsQ-jebL8wNA6qsZWivMBDTk/view#gid=0" rel="nofollow">https://docs.google.com/spreadsheets/d/1rMUrZFie94RLFDKaWVBPsQ-jebL8wNA6qsZWivMBDTk/view#gid=0</a></p>