Python throws an exception for incomparable types. I guess that's not really practical on the web.
Re:“It is never a compiler error”
by TremendousJudge on Wednesday November 15, 2017 @09:11AM
(#15703801)
why is it better to silently fail than to throw an exception simply because it's running on a web browser?
Naturally things are only weird for untyped arrays - calling sort() on e.g. an Int32Array does what you'd expect.