Skip to content

Instantly share code, notes, and snippets.

@marti1125
Created June 26, 2014 23:50
Show Gist options
  • Save marti1125/7ab1851b564d003fee4d to your computer and use it in GitHub Desktop.
Save marti1125/7ab1851b564d003fee4d to your computer and use it in GitHub Desktop.
replace string
function cambiarLetras(letra){
var resultado = letra.replace("Á", "Á").replace("á", "á")
.replace("É", "É").replace("é", "é")
.replace("Í", "Í").replace("í", "í")
.replace("Ó", "Ó").replace("ó", "ó")
.replace("Ú", "Ú").replace("ú", "ú")
.replace("ñ", "ñ").replace("Ñ", "Ñ");
return resultado;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment