emjayess
7/26/2010 - 2:51 PM

arrayify_arguments.js

function $arr(xargs) {
  return Array.prototype.slice.call(xargs);
}

//sample usage:
function someotherfn(arg1,arg2,arg3){
  $args = $arr(arguments);
  $args.sort();
}