ECMA-262 does not require the Array.sort() to be stable, but some browsers do implement this feature.
The Original
000102030410111213142021222324
Sort by the first digit
000102030410111213142021222324
Sort by the second digit
001020011121021222031323041424