main
Last change
on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago |
Update repo after prototype presentation
|
-
Property mode
set to
100644
|
File size:
420 bytes
|
Rev | Line | |
---|
[d565449] | 1 | import baseMean from './_baseMean.js';
|
---|
| 2 | import identity from './identity.js';
|
---|
| 3 |
|
---|
| 4 | /**
|
---|
| 5 | * Computes the mean of the values in `array`.
|
---|
| 6 | *
|
---|
| 7 | * @static
|
---|
| 8 | * @memberOf _
|
---|
| 9 | * @since 4.0.0
|
---|
| 10 | * @category Math
|
---|
| 11 | * @param {Array} array The array to iterate over.
|
---|
| 12 | * @returns {number} Returns the mean.
|
---|
| 13 | * @example
|
---|
| 14 | *
|
---|
| 15 | * _.mean([4, 2, 8, 6]);
|
---|
| 16 | * // => 5
|
---|
| 17 | */
|
---|
| 18 | function mean(array) {
|
---|
| 19 | return baseMean(array, identity);
|
---|
| 20 | }
|
---|
| 21 |
|
---|
| 22 | export default mean;
|
---|
Note:
See
TracBrowser
for help on using the repository browser.