Program to sort string in descending order | JavaScript program to sort a string in descending order using library function ; Driver code ; function call
function descOrder ( s ) { s . sort ( ) . reverse ( ) ; str1 = s . join ( " " ) ; document . write ( str1 ) ; } var s = " " ; s = s . split ( " " ) ; descOrder ( s ) ;