how to pass values in javascript function code example
Example 1: javascript function variable arguments
function foo() {
for (var i = 0; i < arguments.length; i++) {
console.log(arguments[i]);
}
}
foo(1,2,3);
//1
//2
//3
Example 2: if you run a script.js with the code, how do you access the value passed to "var" inside script.js ...
if you run a script.js with the code, how do you access the value passed to "var" inside script.js VAR=value node script.js