Having an issue with sorting an array in descending order by the key. It works perfectly in Firefox, but Chrome is displaying it in the original order.
[["0", 0], ["1", 0.9], ["2", 597.5344192965547], ["3", 991.0326954186761], ["4", 1257.2580315846578], ["5", 1293.5250901880618], ["6", 2197.1091224116512], ["7", 2225.0422585266947], ["8", 3964.1307816747044], ["9", 6914.072436146399]]
This is the function I'm using:
sortable.sort(function(a,b){return b-a})
Firefox returns the correct result:
[["9", 6914.072436146399], ["8", 3964.1307816747044], ["7", 2225.0422585266947], ["6", 2197.1091224116512], ["5", 1293.5250901880618], ["4", 1257.2580315846578], ["3", 991.0326954186761], ["2", 597.5344192965547], ["1", 0.9], ["0", 0]]
However, Google Chrome doesn't sort the array as expected.