Answers for "sort array of string in javascript"

4

javascript sort chars in string

const sort = str => str.split('').sort((a, b) => a.localeCompare(b)).join('');

// Example
sort('hello world');    // dehllloorw
Posted by: Guest on July-03-2020
4

javascript order by string array

users.sort((a, b) => a.firstname.localeCompare(b.firstname))
Posted by: Guest on October-19-2020
0

load sort on string javascript

java script string sort
Posted by: Guest on August-12-2021

Code answers related to "sort array of string in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language