1×
Become a member
to unlock all features

Level Up!

Access all courses & lessons on egghead today and lock-in your price for life.

Autoplay

    Sort arrays in TypeScript

    typescriptTypeScript
    ^2.1.4

    In this lesson we cover all the details of how to sort a list of items using TypeScript. There are a few things that will catch beginner developers off guard, such as the .sort method mutating your array, and how the .sort method doesn’t sort numbers how you’d expect. In this lesson we’ll be going over these gotcha’s and how to work around them.

    We’ll also present a few tricks to make your sort logic more readable and maintainable using TypeScript.