Math.mean()

Get the arithmetic mean or average.

Signature

Math.mean(x: Array) => Number

Description

Gets the arithmetic mean or average of the values in Array x.

Parameters

Parameter Type Required Description

x

Array

Yes

Array of Numbers.

Return value

Type Description

Number

Arithmetic mean or average of the values in Array x.

Examples

Math.mean([1, 2, 3, 4, 4])
2.8

Is this article helpful? 

Tell Fauna how the article can be improved:
Visit Fauna's forums or email docs@fauna.com

Thank you for your feedback!