Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

avascript sum of arguments

x = sumAll(1, 123, 500, 115, 44, 88);

function sumAll() {
  let sum = 0;
  for (let i = 0; i < arguments.length; i++) {
    sum += arguments[i];
  }
  return sum;
}
 
PREVIOUS NEXT
Tagged: #avascript #sum #arguments
ADD COMMENT
Topic
Name
5+2 =