What I'm Learning: How to automatically sort sheets in a Google Spreadsheet Alphabetically

I love it when someone else figures these kinds of things out and then shares them. function sortSheets () {  var ss = SpreadsheetApp.getActiveSpreadsheet();  var sheetNameArray = [];  var sheets = ss.getSheets();     for (var i = 0; i < sheets.length; i++) {    sheetNameArray.push(sheets[i].getName());  }    sheetNameArray.sort();      …

What I'm Learning: How to automatically sort sheets in a Google Spreadsheet Alphabetically

I love it when someone else figures these kinds of things out and then shares them. function sortSheets () {  var ss = SpreadsheetApp.getActiveSpreadsheet();  var sheetNameArray = [];  var sheets = ss.getSheets();     for (var i = 0; i < sheets.length; i++) {    sheetNameArray.push(sheets[i].getName());  }    sheetNameArray.sort();      …