Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript sort array strings alphabetically

//sort array alphabetically
objArray.sort(function(a, b) {
   return a.localeCompare(b);
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #sort #array #strings #alphabetically
ADD COMMENT
Topic
Name
6+6 =