Course lesson

Sort arrays in TypeScript

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...

Duration
4 min
Access
Pro
Transcript
Available

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.

You'll learn 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.