// Runner times
var Eugene = [9.6,10.6,11.2,10.3,11.5];
var Sveta = [10.6,11.2,9.4,12.3,10.1];
var Anton = [12.2,11.8,12.5,10.9,11.1];
//the function calculateAverage
var calculateAverage = function(raceTimes){
var totalTime = 0;
var averageTime;
for(i=0; i
totalTime = totalTime+raceTimes[i];
averageTime = totalTime/raceTimes.length;
}
return averageTime;
};
var
(
Read more... )