Answers for "split string and sort alphabetically"

0

split string and sort alphabetically

function sortString(str) {
   const sort = str.split('').sort().join();
  return sort.replace(/\$|,/g, '');
}

console.log(sortString('Grepper'));
Posted by: Guest on February-16-2021

Code answers related to "split string and sort alphabetically"

Browse Popular Code Answers by Language