When using arrow functions:
[cbCenter, edtTitle].forEach(widget => widget.validate());
The following warning is displayed
The code runs correctly, so I just need to know how to enable the esnext option to get rid of the warning?
When using arrow functions:
[cbCenter, edtTitle].forEach(widget => widget.validate());
The following warning is displayed
The code runs correctly, so I just need to know how to enable the esnext option to get rid of the warning?
The syntax is awkward, you should add the following to the top of your script:
/* jshint esnext:true */
Note that as the other answer says, this will not work for server-side scripts, because Apps Script doesn't support es6. But it will work fine for client-side scripts.