Suppose I have a function as this:
function test(a, b, c, d) {
...
}
Is there a way that I can pass my inputs into the function as follows:
test(a:1,c;2)
Suppose I have a function as this:
function test(a, b, c, d) {
...
}
Is there a way that I can pass my inputs into the function as follows:
test(a:1,c;2)
Named values doesn't support in a function, you have 2 options:
You can not as you exactly suggested, but you could have your function take an object with your arguments as fields.
Ex:
function test(myArguments) {
if (myArguments.a) {
// do something with myArguments.a
}
...
}
Call as:
test({a: 1, b: 2});