javascript get last row googlesheets
//****GLOBALS****
var SpreadsheetID = "1A7Ix7rzrhu7zBKcS7zPeU8w8c_nTae0mBHycvMUE68A";
var SheetName = "CleanData";
function myFunction() {
var ss = SpreadsheetApp.openById(SpreadsheetID)
var sheet = ss.getSheetByName(SheetName);
Logger.log(sheet.getLastRow() + " Is the last Column.");
var range = sheet.getDataRange();
Logger.log(range.getLastRow() + " Is the last Column.");
//Range Values
var data = range.getValues();
Logger.log(data);
}