Your questions answered 🙋

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:

Master Google Sheets Automation

Sign up to receive exclusive Automation tips and tutorials!
I'll send you actionable tips on automating tasks with Google Sheets and coding with Apps Script. You'll also be notified whenever new content is published.
PLUS: Get instant access to my Birthday Reminder Template! 🎂
By signing up you agree to the Privacy Policy & Terms.

Have feedback for me?

I'd appreciate any feedback you can give me regarding this post.

Was it useful? Are there any errors or was something confusing? Would you like me to write a post about a related topic? Any other feedback is also welcome. Thank you so much!