Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created December 18, 2018 05:18
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/8798d8fecfc336481ce073fd7507ca83 to your computer and use it in GitHub Desktop.
Save parzibyte/8798d8fecfc336481ce073fd7507ca83 to your computer and use it in GitHub Desktop.
Prototipos de JS created by parzibyte - https://repl.it/@parzibyte/Prototipos-de-JS
/*
Jugar con los prototipos de JS
@author parzibyte
*/
String.prototype.invertir = function () {
return this.split("").reverse().join("");
}
let cadena = "Hola desde parzibyte.me";
console.log("La cadena es: ", cadena);
console.log("Al invertirla, es: ", cadena.invertir());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment