Q:

Add/Edit Javascript program to calculate minimum, maximum, total and average of the array element

myArray = new Array(1, 4, 3, 2, 7, 6, 5, 9, 8, 10, 0)
document.write("<pre>")
document.write("myArray.toString()\t:\t\t")
document.write(myArray.toString()+"")
document.write("myArray.join('-')\t:\t\t")
document.write(myArray.join ("-")+"")
document.write("myArray.reverse()\t:\t\t")
document.write(myArray.reverse()+"")
document.write("myArray.sort()\t\t:\t\t")
document.write(myArray.sort()+"")

A:

Minimum and maximum
var min = Math.min.apply(null, myArray);
var max = Math.max.apply(null, myArray);

Total
var sum = myArray.reduce(function(a, b) {
    return a + b;
});

Source: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
Average
Just divide sum by the number of array elements:
var average = myArray.reduce(function(a, b) {
    return a + b;
})/myArray.length;

