/math/average
stdCalculates the average of the given array of numbers.
Type signature
(xs?: number[]) => number
Examples
average([2, 4, 15]);
// ⇒ 7
Try in REPL
Questions
- How to compute the average of an array?
(xs?: number[]) => number
average([2, 4, 15]);
// ⇒ 7
Try in REPL