How do we sort a string array in ascending or Descending Order in SAP Design Studio.

Just need help if anyone has faced this kind of scenario before. I want to sort Array of string elements in Ascending or descending order in Design Studio, considering Array has too many elements, so I cant specify order I want.

Considering example : var array_members=["xyz","mno","abc","def"]; I am trying to do it with loop statement. But I don't find any function to compare two string elements.