Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to return argument in javascript

function arrgu() {
  var sum = 0;
  for (var i in arguments) {
    sum = sum + arguments[i];
  }
  document.write(sum);
}
arrgu(10, 20, 30, 40);
arrgu(20, 40, 60); 
>100
>120
 
PREVIOUS NEXT
Tagged: #return #argument #javascript
ADD COMMENT
Topic
Name
7+7 =