Closed nfortuna73 closed 3 months ago
Webkit also seems to work for me. #21 Javascript array.sort takes in a sort function that should return a number - negative for <, 0 for ==, positive for >. The original code returns a bool, which translates to 0 or 1, ie only == or >, never <.
https://stackoverflow.com/a/48082262 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort
Thank you for the fix, hugely appreciated!
Merging & pushing to live.
Webkit also seems to work for me. #21 Javascript array.sort takes in a sort function that should return a number - negative for <, 0 for ==, positive for >. The original code returns a bool, which translates to 0 or 1, ie only == or >, never <.
https://stackoverflow.com/a/48082262 https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort