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.
You have the i value (the positioning of the score in scores array). This i value corresponds with the person in the persons array. Use this i value to select the person.
To make stuff easier you could use an object to associate name (string) with score (int) like:
var test = {"Ben": 88, "Joel": 98, "Judy": 77, "Anne": 88}
Then you would need to modify the for loop.