I am trying to have the name show up with the score that relates to that name. So if the highest score is 98 I want Joels name to show up in the display where is says name here.
else {
names[names.length] = nameInput;
convert to numbers
scoreInput = Number(scoreInput);
scores[scores.length] = scoreInput;
and
//then calculate the average and highest score
var displayResults = function () {
Reset total
total = 0;
for (var i = 0; i < scores.length; i++) {
total = total + scores[i];
if (scores[i] > highestScore) {
highestScore = scores[i];
name = names[i];