Your questions answered

Updated February 15, 2025

Miscellaneous questions

Question M1: I am wondering why the line Array.getChar(string, number) doesn't work. It seems like Apps Script doesn't load the Arrays library. I also have practically no experience with Java…

Google Apps Script is based on ECMAScript. Since the JavaScript programming language is also based on ECMAScript, many JavaScript functions will also work in Apps Script.

The code Array.getChar(string, number), however, is from the Java programming language, which is different from the JavaScript programming language.

In JavaScript (or Apps Script), to access the element at position i in an array arr, use arr[i].

Example

var colors = ['red', 'blue', 'green'];
Logger.log(colors[1]);

Please consider reading the following tutorials:

DISCLAIMER: This content is provided for educational purposes only. All code, templates, and information should be thoroughly reviewed and tested before use. Use at your own risk. Full Terms of Service apply.