programming-examples/js/Functions/Write a JavaScript function that returns a passed string with letters in alphabetical order..js

5 lines
130 B
JavaScript
Raw Normal View History

2019-11-15 12:59:38 +01:00
function alphabet_order(str)
{
return str.split('').sort().join('');
}
console.log(alphabet_order("webmaster"));