Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sum of n numbers in javascript

// sum of n number 


function sum(){
     let sum=0
    for (let index = 0; index < arguments.length; index++) {
        return sum +=arguments[index];
        
    }
}


console.log(sum(3213,1321,3131,31,313));
 
PREVIOUS NEXT
Tagged: #sum #numbers #javascript
ADD COMMENT
Topic
Name
2+8 =