Answers for "sort aray by alphabet"

5

alphabet as array

'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z',
        'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'
Posted by: Guest on November-10-2020
1

javascript alphabetical sort in order

function alphabetized(s) {
 var ans="";
 for (var i=97; i<123; ++i)
   for (var j=0; j<s.length; j++)
     if (s[j].toLowerCase().charCodeAt()==i)
     ans+=s[j]
 return ans
}
Posted by: Guest on February-17-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language