Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

sort items

 cosnt sortItem = ( names ) =>{
  return names.sort(function(first, second) {
    return first.toLowerCase().localeCompare(second.toLowerCase())
  })
}

console.log(sortItem(["fine","Hello","I'm","there"]))
 
PREVIOUS NEXT
Tagged: #sort #items
ADD COMMENT
Topic
Name
2+2 =