Want more egghead?

This lesson is for members. Join us? Get access to all 3,000+ tutorials + a community with expert developers around the world.

Become a Member
1×
Become a member
to unlock all features
Autoplay

    Stable Sort an Array with ES2019 JavaScript

    javascriptJavaScript

    Before ES2019, array sorting in Javascript was not guaranteed to be stable. In this lesson, we'll learn what stable sorting is by emulating stable sorting in an older version of Node. Then, we'll learn how and when stable sorting matters. Finally, we'll use nvm to switch between an older version of Node and a newer version and compare how each version deals with sorting.

    You can find installation instructions for nvm here. Stable sorting was adding to v8 v7.0 (Chrome 70 and Node 11), as noted in this blog post