I have this Javascript array which is generated by user inputs in a form (a score calculator of sorts). Here's an example:
var finalCount = [2600,200,36,36,400,2,0,0];
Each value represents a players total score. I then need to sort the array, so that I get I get a second array with the total overall position, and keeping the player order fixed! The desired array would (in this example) look like this:
var positionResult = [1,3,4,4,2,5,6,6];
As you can see the score can be the same between some players, and if they are, they share that position in the overal result... So, how do I generate positionResult from finalCount ??
Thanks!