VMware Cloud Community
LaxmiRagi
Enthusiast
Enthusiast
Jump to solution

In vRO lambda expression are possible?(fat arrow ->)

Hi,

1. Can we write scripts in lambda style(->)?

2. Which specification will follow (for example ecmascript) ?

Just curiosity to know about vRO.

Thank you

0 Kudos
1 Solution

Accepted Solutions
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

vRO uses Mozilla Rhino engine, version 1.7R4. It is compliant with Javascript 1.7, plus support for some features from Javascript 1.8 / Ecmascript 5. If I'm not mistaken, arrows were introduced with Ecmascript 6, so vRO doesn't support them.

More info on what's supported can be found on Rhino Overview page - https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Overview

View solution in original post

1 Reply
iiliev
VMware Employee
VMware Employee
Jump to solution

Hi,

vRO uses Mozilla Rhino engine, version 1.7R4. It is compliant with Javascript 1.7, plus support for some features from Javascript 1.8 / Ecmascript 5. If I'm not mistaken, arrows were introduced with Ecmascript 6, so vRO doesn't support them.

More info on what's supported can be found on Rhino Overview page - https://developer.mozilla.org/en-US/docs/Mozilla/Projects/Rhino/Overview