It's the worst option except for all the others, I think. JS arrays can contain anything, so if the default behavior was to compare elements as numbers, sorting an array containing mixed types would have unpredictable results (because of comparisons to NaN, etc).
Naturally things are only weird for untyped arrays - calling sort() on e.g. an Int32Array does what you'd expect.
Naturally things are only weird for untyped arrays - calling sort() on e.g. an Int32Array does what you'd expect.