Just like the native JavaScript array, Immutable.js collections have a sort() method. Instead of sorting the values in place like an array, this results in a new collection.
Sorting and reversing
The sort() method
Sorting lists is just like sorting native JavaScript arrays, except that you end up with a new list. The sort() method takes a comparator function, which is used to compare two collection values. If you don't provide this argument, the default comparator uses greater than and less than operators since this is the most common way to sort values:
const myList = List.of(2, 1, 4, 3);
const mySortedList = myList.sort();
console.log('myList', myList.toJS());
// -> myList [ 2, 1, 4, 3 ]
console.log('mySortedList...