Your questions answered
I use this page to answer questions submitted by readers of this blog. Most of these questions are submitted via the contact form at the bottom of every post. In some cases, I incorporate the answers to questions by modifying the tutorial itself (especially to correct mistakes or to add additional details as needed).
Miscellaneous questionsQuestion 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: