Stable Array.sort() in JavaScript

ECMA-262 does not require the Array.sort() to be stable, but some browsers do implement this feature.

These Browsers implement stable Array sorting in JavaScript

These Browsers does not implement stable Array sorting in JavaScript

Test Result for sorting with JavaScript

Expected Result for stable sorting

The Original

000102030410111213142021222324

Sort by the first digit

000102030410111213142021222324

Sort by the second digit

001020011121021222031323041424