T
thaaks
Guest
Hi,
I have a script that looks like this:
where I replace parts inside the message with the following arguments, starting at argument[2].
Now I want to have another script that can be called without the key but uses a preset one. To avoid code redundancy I simply want to call the existing script foo.
Is there a smart way to pass the remaining arguments to foo, no matter how many arguments there are?
I have a script that looks like this:
Code:
///foo(key,messageWithPlaceHolders,arguments)
var key = argument[0];
var msg = argument[1];
// some smart message parsing code here to add the remaining arguments into the message
Now I want to have another script that can be called without the key but uses a preset one. To avoid code redundancy I simply want to call the existing script foo.
Code:
///foobar(messageWithPlaceHolders,arguments)
var key = "whatever";
var msg = argument[0];
foo(key, msg, ???); // how to pass the remaining arguments into foo???