Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ahjustat on March 06, 2019, 02:02:12 am
-
Does EA support JavaScript "for-of" https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/for...of) syntax for iterating through a collection?
-
There is a reference in the manual/website somewhere that indicates which javascript interpreter is used.
But it seems even easier to just try it no?
Geert
-
I tried, but cannot get it to work. Neither 'let' nor 'of' are syntax highlighted as reserved words.
The scripting user guide https://sparxsystems.com.au/resources/user-guides/automation/scripting.pdf (https://sparxsystems.com.au/resources/user-guides/automation/scripting.pdf) states SpiderMonkey 1.8, which is quite old, it looks like.
What do others use? If given the option, I would rather choose a language which isn't Microsoft-specific.
-
...
What do others use? If given the option, I would rather choose a language which isn't Microsoft-specific.
I'm with you on that thought but found it easier just to use JScript as most of the examples are in JScript or VBScript.
-
I'm using VBScript.
One of the reasons is that it allows easy transfer between VBA (Excel/Word) code and VBScript code as both have a nearly identical syntax.
Geert