Javascript Math sum()

Description

Javascript Math sum()


Math.sum = function () {
    var sum = 0;/*www.  java2  s  .  c om*/
    for (var i = 0, j = arguments.length; i < j; i++) {
        sum += arguments[i];
    }
    return sum;
}



PreviousNext

Related