I have a list of objects I wish to sort based on a field attr of type string. I tried using -
attr
-
list.sort(function (a, b) { retur
Nested ternary arrow function
(a,b) => (a < b ? -1 : a > b ? 1 : 0)