The arguments object


arguments.length


Function.arguments.length


for (var i = 0; i < arguments.length; i++)

forNormalLoop('foo', 'bar', 'baz');


for (arg in arguments)

forInArgs('foo', 'bar', 'baz');

This should not create a list, because all properties have { DontEnum } as an attribute.


arguments.callee

Handy for recursive functions.

A factorial method

Math.fact = function(i) {
  if (i > 0) {
    return i * arguments.callee(i - 1);
  } else {
    return 1;
  }
}