We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9e8b68c commit cbf5d1dCopy full SHA for cbf5d1d
Alphabet Soup alphabet_soup.jsAlphabet Soup renamed to alphabet_soup.js
@@ -20,8 +20,9 @@
20
* *
21
***************************************************************************************/
22
23
-function AlphabetSoup(str) {
+const AlphabetSoup = (str) => str?.toLowerCase()?.split("")?.sort()?.join("")
24
25
- return str.split("").sort().join("");
26
-
27
-}
+console.log(AlphabetSoup('jeelelllellre'))
+console.log(AlphabetSoup('AhmedMansour'))
+console.log(AlphabetSoup('Amans199'))
28
+console.log(AlphabetSoup('hello'))
0 commit comments