Beware: Chrome array.sort implementation is unstable!

SEE FULL POST

Beware: Chrome array.sort implementation is unstable!Javascript

by Roberto on December 13, 2012 with 2 comments

Today, we’ve stumbled with a javascript sorting issue. We just wanted to sort some items inside an array but, surprisingly, the results that Google Chrome has shown were completely unexpected.

Let’s say we have a collection of objects with 2 properties: ID (which is a numeric id) and ISACTIVE (boolean here). This collection is properly ordered by ID and you have only one item with ISACTIVE property == true.

continue reading ...

Tags:

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.

Close

Google+