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 fbcd000 commit 640ba4dCopy full SHA for 640ba4d
Parte002/ex1446-ordenar-cadena-caracteres-funcion.js
@@ -0,0 +1,7 @@
1
+// Ejercicio 1446: Ordenar alfabéticamente una cadena de caracteres en una función.
2
+
3
+function ordenarTexto(texto) {
4
+ return [...texto].sort((a, b) => a.localeCompare(b)).join('');
5
+}
6
7
+console.log(ordenarTexto('JavaScript')); // aaciJprStv
0 commit comments