Hi guys, I know this question has been asked before, but every solution seems to return an error and doesnt really in with my code, if you know what I mean.
Simply enough, I just want my array to return the highest value, int value that is, in the array. The only code that is worth showing for this is what I have so far in terms of my array
function GameOver(){
var PlayerScores = new Array (Player1Score, Player2Score, Player3Score);
}
So then I just want it to tell me which of the 3 values that are defined at the end of the game is the highest. I dont even need it to say whether Player1, 2 or 3 is the highest. Just assign the highest to a var. Please keep it to JS.
Thanks lads