recently I tried to calculate Average with the Reduce Method In JavaScript here is may code
var arr = [129, 139, 155, 176];
var result = arr.reduce(function (start, end, index, array){
var total =start + end;
var array_length = array.length;
return total/array_length;
});
console.log(result);
my result is 57.875 but it's wrong, where is my problem and how to resolve it?