The Wayback Machine - https://web.archive.org/web/20170626181350/https://github.com/lodash/lodash/blob/master/mean.js
Skip to content
Permalink
41a8d22 Mar 8, 2017
@jdalton @falsyvalues
20 lines (17 sloc) 355 Bytes
import baseMean from './meanBy.js'
/**
* Computes the mean of the values in `array`.
*
* @since 4.0.0
* @category Math
* @param {Array} array The array to iterate over.
* @returns {number} Returns the mean.
* @example
*
* mean([4, 2, 8, 6])
* // => 5
*/
function mean(array) {
return baseMean(array, (value) => value)
}
export default mean
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.
Morty Proxy This is a proxified and sanitized view of the page, visit original site.