Get average of array?

I’ve got an quiz game with 8 questions. Each question has 5 possible answers. When clicking one of the answers (say it’s answer #3) it adds 3 as the element. So say you pick answer #1 for the first 3 questions, then answer number 2 for the last 5 questions the array looks like this:

scoreArray = (1, 1, 1, 2, 2, 2, 2, 2);

I want to show a result based on the answer picked the most. So how do I pull the “most picked” answer from the array?

I’m going to use that to send the playhead to a certain frame :wink:

Thanks!!