1/* 2 * This is the test JavaScript program used in jjs-argsTest.sh 3 */ 4 5if (typeof(arguments) == 'undefined') { 6 throw new Error("arguments expected"); 7} 8 9if (arguments.length != 2) { 10 throw new Error("2 arguments are expected here"); 11} 12 13if (arguments[0] != 'hello') { 14 throw new Error("First arg should be 'hello'"); 15} 16 17if (arguments[1] != 'world') { 18 throw new Error("Second arg should be 'world'"); 19} 20 21print("Passed"); 22