I have two function a() and b(), both are variadic functions, let say when I call function a() like this :
a(arg0, arg1, arg2, arg3, ...., argn);
then the function b() will be called as well inside a(), but without the first argument “arg0” in the arguments list of a() :
b(arg1, arg2, arg3, ...., argn);
Is there any way for it?
Every JavaScript
functionis really just another “object” (object in the JavaScript sense), and comes with anapplymethod (see Mozilla’s documentation). You can thus do something like this….