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?