O'Reilly logo
  • Ivan Petrov thinks this is interesting:

var sum = function () {
    var len = arguments.length,
        total = 0;
    for (var x = 0; x < len; x++) {
        total += arguments[x];

From

Cover of Expert JavaScript

Note

using the arguments objects