I\'ve been trying to get some functions in a Google apps script (inside a spreadsheet) to modify a global variable, but I can\'t seem to figure it out.
Basically I
Currently (2015), I think the way to go is using the class PropertiesService and the return type Properties.
As I understand it, each new invokation of a script function (time triggers, user clicked a menu item, pressed a button, etc), will lead to a new full parse of the script without memory of earlier executions unless they were persisted somehow (in a spreadsheet range or using Properties for example).