My Google Apps Script Code is structured as follows:
var key = "ID of the Sheet";
var key1 = "ID of the Sheet";
function createTriggers() {
ScriptApp.newTrigger('filter')
.forSpreadsheet(key)
.onEdit()
.create();
}
function createTriggers() {
ScriptApp.newTrigger('filter')
.forSpreadsheet(key1)
.onEdit()
.create();
}
Is there a way to iterate through all keys (key, key1, key2...) and generate triggers using a single function?