Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

arguments object

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

sum(1, 2, 3); // returns 6
Source by github.com #
 
PREVIOUS NEXT
Tagged: #arguments #object
ADD COMMENT
Topic
Name
3+8 =