Skip to content

Instantly share code, notes, and snippets.

@hyonschu
Created May 28, 2013 23:37
Show Gist options
  • Save hyonschu/5666953 to your computer and use it in GitHub Desktop.
Save hyonschu/5666953 to your computer and use it in GitHub Desktop.
var alpha = ["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", "b"];
var str = "This Is A nEw sTriNg of TexT";
//var LetterChanges = function(str) {
var newstr = str.toLowerCase().split("");
for (var i=0;i<newstr.length;i++) {
var j=0;
while (newstr[i] != alpha[j] && j<26) {
j++;
}
newstr[i] = alpha[j+1];
}
//}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment