JavaScript. Array .sort() method returns different results for Chrome and Firefox if array contains duplicate numbers
<p>I have array containing random numbers. When I trying to sort this array via <code>.sort()</code> method, the result is different if array contains duplicate numbers. The code below works differently in Chrome and Firefox:</p>

<pre><code>[1,2,3,4,5,6,7,8,9,2,15,3,4,5,1,2,3,4,0,2,3].sort(function(a, b) {
  console.log("a=", a, "b=", b)
})
</code></pre>

<p>Plunker: <a href="http://plnkr.co/edit/Ocm1ZSXgkoCM7FQeH0v5" rel="noreferrer">http://plnkr.co/edit/Ocm1ZSXgkoCM7FQeH0v5</a></p>

<p>Does it bug ? How to fix this behavior to have same result in Chrome and FF ?</p>