What does this (useless?) javascript code do?
<p>While debugging a javascript code that uses jQuery I found the following code:</p>

<pre><code>[0, 0].sort(function()
{
    baseHasDuplicate = false;
    return 0;
});
</code></pre>

<p>By my understanding of javascript this code will sort array containing two zeroes with comparison function that will always set a global variable and will return equality, which has same effect as <code>baseHasDuplicate = false;</code>.<br>
Coming from a valued source I think I missed something.
Did I miss something or is this a programming fail?</p>
