Closed ajdust closed 8 years ago
JavaScript uses lexicographical sorting by default with .sort(). As in, 10 comes before 3. This is not what you want when sorting indexes. Use a function to compare. See here http://stackoverflow.com/a/1063027/4351294
Thanks!
JavaScript uses lexicographical sorting by default with .sort(). As in, 10 comes before 3. This is not what you want when sorting indexes. Use a function to compare. See here http://stackoverflow.com/a/1063027/4351294