Google Apps Script
ReferenceError: result is not defined (line 39)