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
var str = ['v','a','da','c','k','l'] var b = str.join('').split('').sort().reverse().join('') console.log(b)