Created
August 5, 2015 08:42
-
-
Save VenkataRaju/5a9e6698cbcb41730ae8 to your computer and use it in GitHub Desktop.
Basic Nashorn Script
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (typeof $ARG === "undefined" || $ARG.length !== 2) | |
print("Usage: jjs -scripting --language=es6 test.js -- arg1 arg2"); | |
else | |
doSomething.apply(null, $ARG); | |
function doSomething(first, second) | |
{ | |
print("first: " + first + ", second: " + second); | |
for (let i = 0; i < 2; i++) | |
print(i); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment