Computes the mean of the values in `array`.
mean([4, 2, 8, 6])
// => 5
| Name | Type | Attribute | Description |
|---|---|---|---|
| array | The array to iterate over. |
{
"comment": "/**\r\n * Computes the mean of the values in `array`.\r\n *\r\n * @since 4.0.0\r\n * @category Math\r\n * @param {Array} array The array to iterate over.\r\n * @returns {number} Returns the mean.\r\n * @example\r\n *\r\n * mean([4, 2, 8, 6])\r\n * // => 5\r\n */",
"meta": {
"range": [
280,
349
],
"filename": "mean.js",
"lineno": 15,
"path": "C:\\Users\\beaujeup\\projects\\jsdoc-template\\examples\\lodash\\lodash-repo",
"code": {
"id": "astnode100006046",
"name": "mean",
"type": "FunctionDeclaration",
"paramnames": [
"array"
]
},
"vars": {
"": null
}
},
"description": "Computes the mean of the values in `array`.",
"since": "4.0.0",
"tags": [
{
"originalTitle": "category",
"title": "category",
"text": "Math",
"value": "Math"
}
],
"params": [
{
"type": {
"names": [
"Array"
]
},
"description": "The array to iterate over.",
"name": "array"
}
],
"returns": [
{
"type": {
"names": [
"number"
]
},
"description": "Returns the mean."
}
],
"examples": [
"mean([4, 2, 8, 6])\r// => 5"
],
"name": "mean",
"longname": "mean",
"kind": "function",
"scope": "global",
"___id": "T000002R000565",
"___s": true,
"filepath": "mean.js"
}