Hi Desmond,
Craig has led you astray. The JavaScript engine is bundled into the Java distribution, and if you are using Java 8 (which is currently the version we recommend) you are on the Nashorn JavaScript engine. If you are using Java 7, you are probably also using an old version of Mango, but you should be able to use Java 8 on that old version. RhinoJS was the JavaScript engine in 7.. Stack overflow would have me believe JDK8 may only have a subset of ES6 available to it: https://stackoverflow.com/questions/46898540/unable-to-execute-es6-on-java-8-with-nashornscriptengine including no arrow functions.
You can probably run Mango on Java 9 as things are right now,but there may be lingering compatibility issues as we haven't focused on moving to Java 9, 10, 11 (so many to choose from...). But I believe we've at least fixed the bugs that prevent you from using 9 or 10 (there may be some issues on the github for the ma-core-public project concerning known incompatibilities, like I believe there is some issue starting on SSL in Java 10, etc.)
To the question of ES6, Nashorn DOES support ES6 (or at least some), but not by default. One need either instantiate the JavaScript engine with the ES6 flag (we've discussed making arguments possible to send to the script engine factory, since there are other cool options too!), or set it more globally with an ext-enabled script, then stopping, then starting (not restarting) Mango like,
#!/bin/bash
case "$1" in
init)
# Start with Nashorn toggled to support some ES6 features
JAVAOPTS="$JAVAOPTS -Dnashorn.args=--language=es6"
;;
esac