Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created August 1, 2019 15:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/03eb2030822aa8a59f34572ddd701828 to your computer and use it in GitHub Desktop.
Save parzibyte/03eb2030822aa8a59f34572ddd701828 to your computer and use it in GitHub Desktop.
/**
* Invertir una cadena en JS
* @author parzibyte
* */
const invertirCadena = cadena => {
let nuevaCadena = "";
for (let x = cadena.length - 1; x >= 0; x--) {
nuevaCadena += cadena[x];
}
return nuevaCadena;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment