suckgamoni edited this page May 15, 2013 · 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.
*/
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.