arrayMean function Null safety

num arrayMean(
  1. List array
)

Computes the mean of the values in array.

Implementation

num arrayMean(List<dynamic> array) {
  num sum = 0;
  for (var i = 0; i < array.length; i++) {
    sum += array[i];
  }
  return sum / array.length;
}