Home > Software engineering >  How can I keep an array filled outside of a function?
How can I keep an array filled outside of a function?

Time:04-15

This question is part of finding a solution to a enter image description here

Second run:

enter image description here

Third run:

enter image description here

CodePudding user response:

Save and Retrieve Array from Properties Service

function saveArray(a) {
  PropertiesService.getScriptProperties().setProperty("myarray",JSON.stringify(a));
}

function getArray() {
  return JSON.parse(PropertiesService.getScriptProperties().getProperty("myarray"));
}
  • Related