Answers for "javascript hot to sort letters"

1

javascript hot to sort letters

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

// Example:
sort('eat'); 
// Output:
// 'aet'
Posted by: Guest on October-25-2021

Code answers related to "javascript hot to sort letters"

Code answers related to "Javascript"

Browse Popular Code Answers by Language