[1, false, 10, "b", 3, "33", ":", "R", "^"].sort()
Yields the following sort:
[1, 10, 3, "33", ":", "R", "^", "b", false]
Can anyone explain how the sort method works? I'm guessing that it must be translating everything into ASCII.
The plot thickens when I do this
[1, false, 10, "b", 3, "33", ":", "R", "^"].sort(function(a,b) {return b-a})
Outputs the following:
[10, 1, false, "b", "33", 3, ":", "R", "^"]
Any method to this madness?