I feel like I must be wrong, otherwise someone would have noticed before now, but I think this is wrong:
Code:
for ( i = 0; i < raceTimes.length; i++ ) {
var totalTime = (totalTime || 0) + raceTimes[i];
}
totalTime there is scoped within the for loop, and thus doesn't exist outside, isn't it?
Not that I can ever remember stupid scoping rules in javascript