Today I learned about the surprising default behaviour of JavaScript's array sort method. It doesn’t sort numbers correctly by default (when no compare function is provided). I dug into why. And how ...