For the last few years, I have been using JavaScript on JDK for my programming tasks. At first (around 2009), I used to use Rhino, which is a JS engine developed by Mozilla. Rhino was included in JDK 6. Since JDK 8, Nashorn JavaScript engine was added to JDK as a replacement for Rhino. Its most important feature is its higher speed. In the newest version of Java, i.e. JDK 9, ES6 features have been added to Nashorn. However, these features are not activated by default. You can activate them by using the --language=es6
switch, like this:
java jdk.nashorn.tools.Shell --language=es6 file.js -- args
This adds newer JS features to Nashorn, including arrow functions, support for symbols, iterator protocol, Map
and Set
collections, templates, binary and octal numbers, and some other features as well.
@ghasemkiani your post is very informative always i like it.
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit
very nice keep it up 🤙🏼
Downvoting a post can decrease pending rewards and make it less visible. Common reasons:
Submit