Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9701

Google Apps Script Javascript compatibility error

$
0
0

I have successfully created some code to extract data from a 2D array using A1 notation. Handy to avoid multiple calls to GAS services whit ordinary getRange calls.

While the code perfectly works in javascript, it throws an error in Google Apps Script upon saving.

The offending code is:

return matrix.slice(startRow, endRow + 1).map(i => i.slice(startCol, endCol + 1))

GAS seems rejecting code in the .map function.


Viewing all articles
Browse latest Browse all 9701


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>