This project is read-only.

sum()

Computes the sum of a sequence.

Syntax

Return Value

The sum of the values in the sequence.

Examples

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

document.writeln("The sum of the numbers is " + sum);

/*
 This code produces the following output:

 The sum of the numbers is 635.13.
*/

Last edited May 18, 2012 at 10:46 AM by suckgamoni, version 1

Comments

No comments yet.