For example if I have this function name:
function sortScores(myscores){
I would like to take an array of score records (each containing a score and a page number) and return a sorted version where the records are arranged in descending order of score.
so if I have this example call:
sortScores( [ { score:0, Number:0 }, { score:2, Number:1 }, { score:1, NUmber:2 } ] )
I would get the example result:
[ { score:2, Number:1 }, { score:1, Number:2 }, { score:0, Number:0 } ]
Where the results have been sorts in descending order of score.
I’ve looked at this example, but it only deals with one one value –>