I'm trying to make some kind of leaderboard, such as the example below:
var game = ["Dominoes",95,"Cards",22,"Chess",65];
The idea is to try to group all of the numbers together in the array so that I can return a position on them.
95 - would return 1st place (for the most points)
65 - 2nd place
22 - 3rd place
But the numbers in the "game" variable would also need to be linked in with the games so that if they were sorted numerically then the games would follow suit as well.
Would anyone be able to help with this, please? I'd be grateful for any assistanc