Answers for "sort char in string 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
2

js convert order to char

String.fromCharCode(65,66,67); // returns 'ABC'
Posted by: Guest on March-09-2020

Code answers related to "sort char in string javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language