How to write a function that returns a passed string with letters in alphabetical order in JavaScript? code example
Example: javascript return string in alphabetical order
function alphabet_Soup(str) {
return str.split("").sort().join("");
}
console.log(alphabet_Soup("Python"));
console.log(alphabet_Soup("Exercises"));
//My Solution
function alphaOrder(str) {
return str.split("").sort().join("");
}
console.log(alphaOrder("webdev"))