Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

sum()

suckgamoni edited this page · 1 revision

Computes the sum of a sequence.

Syntax

Return Value

The sum of the values in the sequence.


Example

var numbers = [ 43.68, 1.25, 583.7, 6.5 ];
var sum = from(numbers).sum();

console.log("The sum of the numbers is " + sum);

/*
 This code produces the following output:

 The sum of the numbers is 635.13.
*/
Something went wrong with that request. Please try again.