4 ms·
Hm I don't understand what you mean. What's wrong with `myList.sort()`?
by johnfn 3y ago
Hm I don't understand what you mean. What's wrong with `myList.sort()`?
- CJefferson 3y agoSorry, I mean the things I'm sorting are themselves lists. Imagine for example: [ [1,23], [11,1], [11,44], [22,4] ] I'd consider this list "sorted", as the inner lists are sorted lexicographically. Except, if I gave this list to Javascript and asked it to sort it, it would cast each of the inner lists to strings, which (for example) leads to [11,11] < [1,1], as "[11,11]" < "[1,1]"