Closed gsong closed 9 years ago
Fix the compare function according to JS spec: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort.
If you revert the comparison function to how it was before, the test fails:
function byLongestUnreved(a, b) { return a.unreved.length < b.unreved.length; }
Thanks @gsong!
Fix the compare function according to JS spec: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort.
If you revert the comparison function to how it was before, the test fails: