Enabling strict mode in google-apps-script files using Chrome on a Chromebook

Can I set 'use strict' in google-apps-script? I created a function to verify this

function a () { //logs - function a "use strict"; Logger.log(arguments.callee); } 

If strict mode were applied, I would have thought that this operator would throw a TypeError.

+4
source share
1 answer

Script applications do not support strict mode on the server. If you use the HtmlService, all of the Script client code you write is implicit mode, regardless of whether you are instructed to "use strict".

+6
source

Source: https://habr.com/ru/post/1446664/


All Articles