Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to remove the first argument of function?

Tags:

If I have a function I can forward all its arguments with the arguments variable.

Now I have a function that needs one (the first) argument for itself and should only forward the rest.

For example:

var calledFunction = function(num){
    //do something with num
    //remove num from the arguments
    forwardFunction(arguments);
}

I already tried arguments.shift(); but arguments is only a "Array-like object" and therefore doesn't know the shift() function.

How to remove the first argument from the arguments and forward the rest of the series of arguments?


Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!