Hello, The following code behaves strangely (inconsistent with other engines). a=[3.3,2.2,1]; a.sort(function () { return -1;}); In Safari, output is [1, 2.2, 3.3] However, output should be: [3.3, 2.2, 1] BT group 2018.6.28
I think this is OK. This relies on how comparator is called (since it does not produce consistent results, comp(a, b) => -1 comp(b, a) => -1), and it is implementation dependent according to the spec.