Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript sum of arguments

function addAll(){
  var result =0; 
  for(const number of arguments){
     result += number;
  }
   return result;
}
addAll(1,2,3,4,5,6,7,8,9,10)
Source by 1loc.dev #
 
PREVIOUS NEXT
Tagged: #javascript #sum #arguments
ADD COMMENT
Topic
Name
3+3 =