Earlier quoted context omitted.
It depends on whether or not you pass it a basic comparator function, eg: someArray.sort((a,b) => a - b); But yeah the example would have needed this for the less complex example as well to be accurate.
Shouldn't that be `a < b`?
If `a-b` returns a negative number, the result will be treated as -1. If the numbers are the same, then you end up with 0, and so on.
I don't know what's faster in that case.