Open Odonno opened 5 years ago
Indead, I suppose that when mean is used with an empty array, it divides by 0 and so it returns NaN. I think it would be more appropriate to return undefined when we cannot execute the calculation.
mean
undefined
Indead, I suppose that when
mean
is used with an empty array, it divides by 0 and so it returns NaN. I think it would be more appropriate to returnundefined
when we cannot execute the calculation.