According to this thread from the old Google Group, Apps Script is based on ECMA-262 3rd Edition.
This would seem to be supported by the fact that auto-completion in the editor displays 3rd Edition array functions.
However the following code runs perfectly well, which casts doubt on the matter:
var array = [
1,2,3,4,5
];
Logger.log("forEach:");
array.forEach(function (item,idx,arr) {
Logger.log(item);
});
Note the use of ECMA-262 5th Edition Array function forEach.
Would someone authoritative mind giving a definitive answer on why this is the case? And whether it's safe to rely on all 5th Edition features or a sub-set that have been implemented and seem to work?