title: Why is values.length = 2 in this piece of code?
body: <p>This is the piece of code. I would like to know why values.length = 2 when I have 1 header and 1 row in the document. The range has height 1 because it start is the second row, so why 2?</p>
  
  <pre><code>function pushToCalendar() {
  
    var ss = SpreadsheetApp.getActiveSpreadsheet();
    var sheet = ss.getSheetByName('scheduler');
    var lastRow = sheet.getLastRow(); 
    var range = sheet.getRange(2,1,lastRow,9);
    var values = range.getValues();   
    var updateRange = sheet.getRange('scheduler!J1'); 
    var calendar =     CalendarApp.getCalendarById('rrgfkvm77h6gd6h0mcu1f701os@group.calendar.google.com')
    updateRange.setFontColor('red');
  
    for (var i = 0; i &lt; values.length-1; i++) {            
        if (values[i][4] != '●') {                       
          var newEventTitle = values[i][0];
          var newEvent = calendar.createEvent(newEventTitle, 
               new Date(values[i][7]),
               new Date(values[i][8])); 
          var newEventId = newEvent.getId();
          sheet.getRange(i+2,6).setValue('●');
          sheet.getRange(i+2,7).setValue(newEventId);  
        }
    }
  
    updateRange.setFontColor('white');
  }
  </code></pre>