Javascript sort array by key descending Google Chrome
问题 I have an array and need to sort it in descending order by the key. All working good in Firefox but in Chrome it's showing 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 code I am using sortable.sort(function(a,b){return b-a}) So in Firefox it returns the correct result [[