What functions do Arrays in Google Apps Script support?

前端 未结 3 1404
温柔的废话
温柔的废话 2020-12-23 18:14

I keep on finding that Array functions are missing in GAS, eg calling find gives the error: Cannot find function find in object

The only d

3条回答
  •  北海茫月
    2020-12-23 18:31

    Logger.log(Object.getOwnPropertyNames(Array.prototype)) gives the following, which I think it is the correct list:

    [constructor, toString, toLocaleString, toSource, join, reverse, sort, push, pop, shift, unshift, splice, concat, slice, indexOf, lastIndexOf, every, filter, forEach, map, some, reduce, reduceRight, length]

提交回复
热议问题