Access JavaScript function arguments as an Array
by gmosx, at 31 Jan 2009Fear not, the following one-liner converts the arguments variable to a real Array:
var args = Array.prototype.splice.call(arguments, 0);The Array .splice() method is injected into the special arguments object to extract it's members and return a new Array.


