Simple question: Can anyone point to a resource or knows anything about which standard of Javascript is supported in Google Apps Script?
I assume naturally that ES5 is fully supported, but what about ES6 (and even 7)?
Note: I mean the built-in code editor, which will appear if you open a Spreadsheet (for example), and click Tools > Script editor...
According to the docs Apps Script is based on JavaScript 1.6.
This table explains the correlation to the ES standards.
In the native editor it appears you are limited to an earlier version of JS (~ES5).
There is an official tool called "Clasp" though, which lets you write typescript (
.ts
) files with ES6+ syntax and then compile & upload your files to Drive withclasp push --watch
.Alternatively, you can use Webpack in your local setup as detailed in this answer.
From https://developers.google.com/apps-script/guides/services/#basic_javascript_features (January 27, 2019)
My guess is AngluarJS is since it was made by a google developer.