Javascript is a wonderful language, full of twists and turns. I was surprised that I could:


arguments.length

but not


arguments.slice()

It turns out it's because arguments is not a real array, but a function, which you can access like an array, e.g.:


arguments[0]

To do a slice() op on it:


var args = Array.prototype.slice.call(arguments, 1);