Skip to content

Instantly share code, notes, and snippets.

@hyonschu
Created May 28, 2013 22:35
Show Gist options
  • Save hyonschu/5666674 to your computer and use it in GitHub Desktop.
Save hyonschu/5666674 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 ";
//var LetterChange = function(str) {
var newStr = str.toLowerCase().split("");
for (var i = 0;i<newStr.length;i++) {
var j=0;
while (newStr[i] != alpha[i] && j<26)
{ j++ }
newStr[i] = alpha[i+1];
//return newStr;
}
//}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment