average method
Returns the average value (arithmetic mean) of all elements.
Example:
[2, 4, 6, 8].average(); // 5.0
Implementation
double? average() {
return averageBy((n) => n);
}
Returns the average value (arithmetic mean) of all elements.
Example:
[2, 4, 6, 8].average(); // 5.0
double? average() {
return averageBy((n) => n);
}