Is there a possibility to use the contents of an array in another function? For example, I have the following code:
var locations = [];
function values() {
var values = ['test1','test1']
for (i in values) {
locations.push(values[i]);
}
}
Logger.log(locations)
Now it logs nothing, but if I place the logger in the function, it returns the contents of the array.