Ad
  • Custom User Avatar

    Not a bug. Since this Kata is still using Node v8, the sort is not stable, as this was not required at the time.
    Since ECMAScript version 10 (ES2019), the specification dictates that Array.prototype.sort must be stable (preserve order). This was introduced to Node with version 12.

    Modern browsers usually adhere to the newest specification, but it's good to keep in mind that programming only for the newest specification might break stuff for older browsers/systems.