I was trying to sort an Array And i got this different behavior in Chrome V79 than Firefox Dev Edition V72 (both in Desktop version).
This was the test,
console.log([4, 2, 5, 1, 3].sort((a, b) => a>b));
console.log(Array.prototype.sort.call([4, 2, 5, 1, 3], (a, b) => a>b));
In Firefox Dev, I get this result,
But In Chrome, Why I get this result,
But When I i Pass the same array with var, I get this,
But Yeah it sorts the Array and REWRITES THE VARIABLE but returns the unsorted version of the Array. So, When I am passing The Array directly without any var, i get no sorting. But, 
As per MDN's reference page shouldn't it return the sorted Array ??
Why there's difference ??
Note: In the Example Imgs, there are two exmaple's I was practicing
callfunc. And forgot to remove it. So, just ignore it. Both of 'em are same.




0,1, or-1from the sort function, not a boolean..sort()should be implemented are not part of the spec. Chrome and Firefox have slightly different algorithms.Array.sortwas stable -- that is, there was no guarantee that equal values would retain their relative positions. Thus, returning false/0 whena < bmight "happen" to work for stable sort and not for unstable sort or vice-versa, but it's not guaranteed.