Skip to content

Instantly share code, notes, and snippets.

@hyonschu
Created May 28, 2013 22:41
Show Gist options
  • Save hyonschu/5666708 to your computer and use it in GitHub Desktop.
Save hyonschu/5666708 to your computer and use it in GitHub Desktop.
var alpha = ["a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "U", "v", "w", "x", "y", "z", "a"];
var str = "This Is A nEw sTriNg of TexT ";
//var LetterChange = function(str) {
var newStr = str.toLowerCase().split("");
for (var i = 0;i<newStr.length;i++) {
j=0;
while (newStr[i] != alpha[j] && j<26)
{ j++;
newStr[i] = alpha[j+1]; }
//return newStr;
}
//}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment