Operator Type:
Operator Scope of Action:
Operator Purpose:
Data Type Returned:
Operator First Added:
Operator in Current Baseline:
Operator Last Altered:
Function [other Function type actions]
List [operators of similar scope]
Dictionary, Set & List operations [other Dictionary, Set & List operations operators]
Number [about Number data type]
v9.0.0
Baseline
As at baseline
Syntax note: Operators without any defined mandatory arguments may omit their empty closing parentheses
list.avg()
list.avg
Returns the mean value of a List- or Set-type list of numbers. For example, if MyList is a list of numerical values '3;4;8;3;9;2;12':
$MyNumber = $MyList.avg; returns 5.85714
To get only two decimal places:
$MyNumber = $MyList.avg.format("2"); returns 5.86