HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by Yaggo | Hacker News Reader
Parent
Full thread
Yaggo
·
So how should [1, "a", 2, 3] be sorted by default?
View on HN
integraton
·
Both Python and Erlang would return [1,2,3,"a"], Ruby and Clojure won't allow the comparison. Either of these approaches makes more sense than JavaScript's.
bpicolo
·
Javascript returns [1,2,3,a]. What's the problem.
integraton
·
> [1,2,"10",3].sort() [ 1, '10', 2, 3 ]
That's the problem.
Reply on news.ycombinator.com