Lets take a look at this code:
var mainFunction = function() { altFunction.apply(null, arguments); }
The arguments that are passed to \"mainF
The arguments object isn't an array; it's like an array, but it's different. You can turn it into an array however:
arguments
var mainArguments = [].slice.call(arguments, 0);
Then you can push another value onto the end:
mainArguments.push("whatever");