summaryrefslogtreecommitdiff
path: root/jstests/core/array3.js
blob: 42acdfb6d3e54aca9964744fd9c4b470c842fa58 (plain)
1
2
3
4
5
6
7

assert.eq(5, Array.sum([1, 4]), "A");
assert.eq(2.5, Array.avg([1, 4]), "B");

arr = [2, 4, 4, 4, 5, 5, 7, 9];
assert.eq(5, Array.avg(arr), "C");
assert.eq(2, Array.stdDev(arr), "D");