I want to run the function myFunction in google app script and the result is a concatenated string.The result i want is 'AB' but my return value is only 'A'.
How should I do it
var data = 'A';
function myFunction() {
appenData(data);
Logger.log(data);
}
function appenData(data) {
data += 'B';
}